Unverified Commit 85c9097c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

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

parents f6dfab45 936b69d6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -144,7 +144,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;
		}