On Tue, Oct 18, 2005 at 08:45:12PM -0700, Pete Zaitcev wrote:
> On Tue, 18 Oct 2005 20:28:48 -0700, Greg KH <[EMAIL PROTECTED]> wrote:
> 
> > > > Any objections to me adding this?
> > > 
> > > No objections. You do add a lock which wasn't there before, but it
> > > seems that usbmon at least is not affected. It does not call much
> > > from initialization and tear-down functions, so I do not see an
> > > opportunity for deadlocks.
> > 
> > What lock did I add?
> 
> Woops, I assumed that notifier_call_chain had one inside. It was
> inconceivable to me that you would neglect to lock the chain.
> 
> Very well, what does prevent a module to call usb_register_notify
> (on a context of a modprobe) in the same time as khubd is adding
> a new device and is walking the chain with usb_notify_device_add()?

It looks like it's safe to walk the list and add a new notifier at the
same time.  Take a look at kernel/sys.c::notifier_chain_register() to
see if I missed something.

Or am I wrong?

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to