lkml.org 
[lkml]   [2021]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v5] tracepoint: Do not fail unregistering a probe due to memory failure
On Sat, 30 Jan 2021 09:36:26 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> Do you still have the same crash with v3 (that's the one I'm going to
> go with for now.)
>
> https://lore.kernel.org/r/20201118093405.7a6d2290@gandalf.local.home

Just curious, does the following patch fix it for v5?

-- Steve

diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index 7261fa0f5e3c..cf3a6d104fdb 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -306,6 +306,7 @@ static int tracepoint_remove_func(struct tracepoint *tp,
tp->unregfunc();

static_key_disable(&tp->key);
+ tracepoint_synchronize_unregister();
rcu_assign_pointer(tp->funcs, tp_funcs);
} else {
rcu_assign_pointer(tp->funcs, tp_funcs);
\
 
 \ /
  Last update: 2021-01-30 17:25    [W:0.064 / U:3.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site