Re: [Lse-tech] Re: [PATCH 0/7]: Fix for unsafe notifier chain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 27, 2005 at 11:56:40AM -0800, Andrew Morton wrote:
> We're saying that kernel/sys.c:notifier_lock should be removed and that all
> callers of notifier_chain_register(), notifier_chain_unregister() and
> notifier_call_chain() should be changed to define and use their own lock.
> 
> So the _callers_ get to decide whether they're going to use down(),
> spin_lock(), down_read(), read_lock(), preempt_disable(), local_irq_disable()
> or whatever.

I completely agree.  I just watched in mute horror as Chandra and Alan
spun off into the rcu blackhole trying to create one-size-fits-all
notifiers.

Making the user do the locking it needs to do is simple and sane.

And the reason USB's notifiers are implemented correctly, is they don't
use the notifier core, but rather, reimplemented their own, due to the
locking mess.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux