lkml.org 
[lkml]   [2021]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5] tracepoint: Do not fail unregistering a probe due to memory failure
From
Date


On 31/01/2021 01:42, Steven Rostedt wrote:
> 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?


Yes it does!


>
> -- 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);
>

--
Alexey

\
 
 \ /
  Last update: 2021-02-01 02:23    [W:0.047 / U:2.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site