[lkml]   [2005]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Notifier chains are unsafe
On Wed, 26 Oct 2005, Andi Kleen wrote:

> Like I wrote earlier: as long as the notifier doesn't unregister itself
> the critical RCU section for the list walk is only a small part of notifier_call_chain.
> It's basically a stable anchor in the list that won't change.

I have to disagree with you. The critical section is the entire dynamic
scope of notifier_call_chain. After all, what if a _different_ thread
unregisters a notifier routine while the routine is running? What if the
_following_ routine is unregistered also?

The desired behavior for notifier_unregister is that when it returns, the
notifier routine is not running on any processor and will not start
running. The only way to guarantee this is to put the entire routine into
the critical section. And that means putting the entire chain into the
critical section.

Alan Stern

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-10-27 16:15    [W:0.036 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site