Unverified Commit 7e717645 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11855 VMCI: Fix use-after-free when removing resource in vmci_resource_remove()

parents f9510969 2f273c88
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -152,7 +152,8 @@ void vmci_resource_remove(struct vmci_resource *resource)
	spin_lock(&vmci_resource_table.lock);

	hlist_for_each_entry(r, &vmci_resource_table.entries[idx], node) {
		if (vmci_handle_is_equal(r->handle, resource->handle)) {
		if (vmci_handle_is_equal(r->handle, resource->handle) &&
		    resource->type == r->type) {
			hlist_del_init_rcu(&r->node);
			break;
		}