Re: ftrace startup tests crashing due to missing rcu_synchronize()

From: Sven Schnelle
Date: Wed Feb 16 2022 - 14:32:03 EST


Steven Rostedt <rostedt@xxxxxxxxxxx> writes:

> On Wed, 16 Feb 2022 13:54:19 -0500
> Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
>> That is, shutdown is called, the item is removed from the list and freed,
>> but something got preempted while on the ftrace trampoline, with a
>> reference to the item, and then woke up and executed the item that was
>> freed.
>>
>> I'll look into it. Thanks for the report.
>
> OK, I wonder if something changed with "is_kernel_core_date()"?
>
> Because on registering, we have:
>
> if (!is_kernel_core_data((unsigned long)ops))
> ops->flags |= FTRACE_OPS_FL_DYNAMIC;

I checked, and the flag gets set here. I cannot say whether it
is also set when the system crashes, but i would expect it.