Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-02-02 Thread Greg KH
On Tue, Jan 25, 2005 at 11:10:46AM -0500, Mike Waychison wrote: > Get rid of semaphore abuse by converting device_driver->unload_sem > semaphore to device_driver->unloaded completion. > > This should get rid of any confusion as well as save a few bytes in the > process. > > Signed-off-by: Mike

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-02-02 Thread Greg KH
On Tue, Jan 25, 2005 at 11:10:46AM -0500, Mike Waychison wrote: Get rid of semaphore abuse by converting device_driver-unload_sem semaphore to device_driver-unloaded completion. This should get rid of any confusion as well as save a few bytes in the process. Signed-off-by: Mike Waychison

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-25 Thread Thomas Gleixner
On Tue, 2005-01-25 at 11:19 -0800, Greg KH wrote: > On Tue, Jan 25, 2005 at 08:27:15AM -0800, Linus Torvalds wrote: > > > > > > Hmm.. I certainly like the "use completions" patch, since it makes it a > > lot more obvious what is going on (and it is what completions were > > designed for). > > >

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-25 Thread Greg KH
On Tue, Jan 25, 2005 at 08:27:15AM -0800, Linus Torvalds wrote: > > > Hmm.. I certainly like the "use completions" patch, since it makes it a > lot more obvious what is going on (and it is what completions were > designed for). > > However, since it does change semantics very subtly: if you

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-25 Thread Linus Torvalds
Hmm.. I certainly like the "use completions" patch, since it makes it a lot more obvious what is going on (and it is what completions were designed for). However, since it does change semantics very subtly: if you call "driver_unregister()" twice (which is wrong, but looking at the code it

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-25 Thread Mike Waychison
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill Davidsen wrote: > > Let's clean up the spelling as well >> - *Though, once that is done, we attempt to take @drv->unload_sem. >> + *Though, once that is done, we wait until @drv->unloaded is >> copmleted. > >

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-25 Thread Bill Davidsen
Mike Waychison wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greg KH wrote: On Mon, Jan 24, 2005 at 07:25:19PM +0100, Jirka Kosina wrote: Hi, there has been (for quite some time) a bug in function driver_unregister() - the lock/unlock sequence is protecting nothing and the actual

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-25 Thread Bill Davidsen
Mike Waychison wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greg KH wrote: On Mon, Jan 24, 2005 at 07:25:19PM +0100, Jirka Kosina wrote: Hi, there has been (for quite some time) a bug in function driver_unregister() - the lock/unlock sequence is protecting nothing and the actual

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-25 Thread Mike Waychison
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill Davidsen wrote: Let's clean up the spelling as well - *Though, once that is done, we attempt to take @drv-unload_sem. + *Though, once that is done, we wait until @drv-unloaded is copmleted.

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-25 Thread Linus Torvalds
Hmm.. I certainly like the use completions patch, since it makes it a lot more obvious what is going on (and it is what completions were designed for). However, since it does change semantics very subtly: if you call driver_unregister() twice (which is wrong, but looking at the code it looks

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-25 Thread Greg KH
On Tue, Jan 25, 2005 at 08:27:15AM -0800, Linus Torvalds wrote: Hmm.. I certainly like the use completions patch, since it makes it a lot more obvious what is going on (and it is what completions were designed for). However, since it does change semantics very subtly: if you call

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-25 Thread Thomas Gleixner
On Tue, 2005-01-25 at 11:19 -0800, Greg KH wrote: On Tue, Jan 25, 2005 at 08:27:15AM -0800, Linus Torvalds wrote: Hmm.. I certainly like the use completions patch, since it makes it a lot more obvious what is going on (and it is what completions were designed for). However, since

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-24 Thread Mike Waychison
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greg KH wrote: > On Mon, Jan 24, 2005 at 07:25:19PM +0100, Jirka Kosina wrote: > >>Hi, >> >>there has been (for quite some time) a bug in function driver_unregister() >>- the lock/unlock sequence is protecting nothing and the actual

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-24 Thread Greg KH
On Mon, Jan 24, 2005 at 07:25:19PM +0100, Jirka Kosina wrote: > Hi, > > there has been (for quite some time) a bug in function driver_unregister() > - the lock/unlock sequence is protecting nothing and the actual > bus_remove_driver() is called outside critical section. > > Please apply. No,

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-24 Thread Chris Wright
* Jirka Kosina ([EMAIL PROTECTED]) wrote: > there has been (for quite some time) a bug in function driver_unregister() > - the lock/unlock sequence is protecting nothing and the actual > bus_remove_driver() is called outside critical section. Re-read the comment. It's intentionally done that

[PATCH] fix bad locking in drivers/base/driver.c

2005-01-24 Thread Jirka Kosina
Hi, there has been (for quite some time) a bug in function driver_unregister() - the lock/unlock sequence is protecting nothing and the actual bus_remove_driver() is called outside critical section. Please apply. --- linux-2.6.11-rc2/drivers/base/driver.c.old 2005-01-22 02:48:48.0

[PATCH] fix bad locking in drivers/base/driver.c

2005-01-24 Thread Jirka Kosina
Hi, there has been (for quite some time) a bug in function driver_unregister() - the lock/unlock sequence is protecting nothing and the actual bus_remove_driver() is called outside critical section. Please apply. --- linux-2.6.11-rc2/drivers/base/driver.c.old 2005-01-22 02:48:48.0

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-24 Thread Chris Wright
* Jirka Kosina ([EMAIL PROTECTED]) wrote: there has been (for quite some time) a bug in function driver_unregister() - the lock/unlock sequence is protecting nothing and the actual bus_remove_driver() is called outside critical section. Re-read the comment. It's intentionally done that way.

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-24 Thread Greg KH
On Mon, Jan 24, 2005 at 07:25:19PM +0100, Jirka Kosina wrote: Hi, there has been (for quite some time) a bug in function driver_unregister() - the lock/unlock sequence is protecting nothing and the actual bus_remove_driver() is called outside critical section. Please apply. No, please

Re: [PATCH] fix bad locking in drivers/base/driver.c

2005-01-24 Thread Mike Waychison
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greg KH wrote: On Mon, Jan 24, 2005 at 07:25:19PM +0100, Jirka Kosina wrote: Hi, there has been (for quite some time) a bug in function driver_unregister() - the lock/unlock sequence is protecting nothing and the actual bus_remove_driver() is