[03/13] misc: vmw_vmci: Rename kvfree_rcu() to kvfree_rcu_mightsleep()

Message ID 20230201150815.409582-4-urezki@gmail.com
State New
Headers
Series Rename k[v]free_rcu() single argument to k[v]free_rcu_mightsleep() |

Commit Message

Uladzislau Rezki Feb. 1, 2023, 3:08 p.m. UTC
  The kvfree_rcu()'s single argument name is deprecated therefore
rename it to kvfree_rcu_mightsleep() variant. The goal is explicitly
underline that it is for sleepable contexts.

Cc: Bryan Tan <bryantan@vmware.com>
Cc: Vishnu Dasa <vdasa@vmware.com>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
 drivers/misc/vmw_vmci/vmci_context.c | 2 +-
 drivers/misc/vmw_vmci/vmci_event.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Uladzislau Rezki March 9, 2023, 1:41 p.m. UTC | #1
> The kvfree_rcu()'s single argument name is deprecated therefore
> rename it to kvfree_rcu_mightsleep() variant. The goal is explicitly
> underline that it is for sleepable contexts.
> 
> Cc: Bryan Tan <bryantan@vmware.com>
> Cc: Vishnu Dasa <vdasa@vmware.com>
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
>
Could you please add you reviwed-by or Acked-by tags so we can bring
our series with renaming for the next merge window?

Thanks!

--
Uladzislau Rezki
  
Vishnu Dasa March 9, 2023, 2:36 p.m. UTC | #2
> On Feb 1, 2023, at 7:08 AM, Uladzislau Rezki (Sony) <urezki@gmail.com> wrote:
> 
> The kvfree_rcu()'s single argument name is deprecated therefore
> rename it to kvfree_rcu_mightsleep() variant. The goal is explicitly
> underline that it is for sleepable contexts.
> 
> Cc: Bryan Tan <bryantan@vmware.com>
> Cc: Vishnu Dasa <vdasa@vmware.com>
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>

Reviewed-by: Vishnu Dasa <vdasa@vmware.com>

> ---
> drivers/misc/vmw_vmci/vmci_context.c | 2 +-
> drivers/misc/vmw_vmci/vmci_event.c   | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/misc/vmw_vmci/vmci_context.c b/drivers/misc/vmw_vmci/vmci_context.c
> index 172696abce31..f22b44827e92 100644
> --- a/drivers/misc/vmw_vmci/vmci_context.c
> +++ b/drivers/misc/vmw_vmci/vmci_context.c
> @@ -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);
> 
> diff --git a/drivers/misc/vmw_vmci/vmci_event.c b/drivers/misc/vmw_vmci/vmci_event.c
> index 2100297c94ad..5d7ac07623c2 100644
> --- a/drivers/misc/vmw_vmci/vmci_event.c
> +++ b/drivers/misc/vmw_vmci/vmci_event.c
> @@ -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;
> }
> -- 
> 2.30.2
>
  

Patch

diff --git a/drivers/misc/vmw_vmci/vmci_context.c b/drivers/misc/vmw_vmci/vmci_context.c
index 172696abce31..f22b44827e92 100644
--- a/drivers/misc/vmw_vmci/vmci_context.c
+++ b/drivers/misc/vmw_vmci/vmci_context.c
@@ -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);
 
diff --git a/drivers/misc/vmw_vmci/vmci_event.c b/drivers/misc/vmw_vmci/vmci_event.c
index 2100297c94ad..5d7ac07623c2 100644
--- a/drivers/misc/vmw_vmci/vmci_event.c
+++ b/drivers/misc/vmw_vmci/vmci_event.c
@@ -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;
 }