Re: On trace_*_rcuidle functions in modules

From: Steven Rostedt
Date: Wed Apr 15 2020 - 16:41:22 EST


On Wed, 15 Apr 2020 13:17:53 -0700
John Stultz <john.stultz@xxxxxxxxxx> wrote:

> > Hmm, isn't module code itself synchronized via RCU. Then having module code
> > being called without RCU "watching" could be dangerous?
>
> I'm not sure I'm following you here. Could you explain more?

So how does this code get registered to be called as a module? And if it is
registered, I'm guessing it needs to be unregistered too. How would that be
synchronized? Usually, calling synchronize_rcu() is done after
unregistering, but if that code is called without RCU watching, it is
possible synchronize_rcu() can finish before that code is released.

-- Steve