lkml.org 
[lkml]   [2021]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 6/9] net/tipc: Switch to kvfree_rcu() API
Date
Instead of invoking a synchronize_rcu() to free a pointer
after a grace period we can directly make use of new API
that does the same but in more efficient way.

CC: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
net/tipc/crypto.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c
index b4d9419a015b..c2d16c40778d 100644
--- a/net/tipc/crypto.c
+++ b/net/tipc/crypto.c
@@ -2391,8 +2391,7 @@ static void tipc_crypto_work_rx(struct work_struct *work)
resched = true;
break;
default:
- synchronize_rcu();
- kfree(rx->skey);
+ kvfree_rcu(rx->skey);
rx->skey = NULL;
break;
}
--
2.30.2
\
 
 \ /
  Last update: 2021-11-24 12:04    [W:0.164 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site