Messages in this thread Patch in this message | | | From | "Uladzislau Rezki (Sony)" <> | Subject | [PATCH 5/9] x86/mm: Switch to kvfree_rcu() API | Date | Wed, 24 Nov 2021 12:03:04 +0100 |
| |
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
| |