misc: vmw_vmci: Rename kvfree_rcu() to kvfree_rcu_mightsleep()
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Wed, 1 Feb 2023 15:08:09 +0000 (16:08 +0100)
committerJoel Fernandes (Google) <joel@joelfernandes.org>
Wed, 5 Apr 2023 13:48:03 +0000 (13:48 +0000)
The kvfree_rcu() macro's single-argument form is deprecated.  Therefore
switch to the new kvfree_rcu_mightsleep() variant. The goal is to
avoid accidental use of the single-argument forms, which can introduce
functionality bugs in atomic contexts and latency bugs in non-atomic
contexts.

Cc: Bryan Tan <bryantan@vmware.com>
Cc: Vishnu Dasa <vdasa@vmware.com>
Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
drivers/misc/vmw_vmci/vmci_context.c
drivers/misc/vmw_vmci/vmci_event.c

index 172696abce31b0d7dc3e922028c77666b0b37feb..f22b44827e9295e7628aaf322392758f5f32c057 100644 (file)
@@ -687,7 +687,7 @@ int vmci_ctx_remove_notification(u32 context_id, u32 remote_cid)
        spin_unlock(&context->lock);
 
        if (notifier)
-               kvfree_rcu(notifier);
+               kvfree_rcu_mightsleep(notifier);
 
        vmci_ctx_put(context);
 
index 2100297c94ad02ef18c9e06e0f3bd1938d396536..5d7ac07623c27330d42a37686329293b2761ef67 100644 (file)
@@ -209,7 +209,7 @@ int vmci_event_unsubscribe(u32 sub_id)
        if (!s)
                return VMCI_ERROR_NOT_FOUND;
 
-       kvfree_rcu(s);
+       kvfree_rcu_mightsleep(s);
 
        return VMCI_SUCCESS;
 }