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 5/9] x86/mm: 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: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
arch/x86/mm/mmio-mod.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
index 933a2ebad471..e75137a06c32 100644
--- a/arch/x86/mm/mmio-mod.c
+++ b/arch/x86/mm/mmio-mod.c
@@ -307,10 +307,8 @@ static void iounmap_trace_core(volatile void __iomem *addr)

not_enabled:
spin_unlock_irq(&trace_lock);
- if (found_trace) {
- synchronize_rcu(); /* unregister_kmmio_probe() requirement */
- kfree(found_trace);
- }
+ if (found_trace)
+ kvfree_rcu(found_trace); /* unregister_kmmio_probe() requirement */
}

void mmiotrace_iounmap(volatile void __iomem *addr)
--
2.30.2
\
 
 \ /
  Last update: 2021-11-24 12:04    [W:0.645 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site