public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix bad locking in drivers/base/driver.c
@ 2005-01-24 18:25 Jirka Kosina
  2005-01-24 19:00 ` Chris Wright
  2005-01-25  5:56 ` Greg KH
  0 siblings, 2 replies; 10+ messages in thread
From: Jirka Kosina @ 2005-01-24 18:25 UTC (permalink / raw)
  To: Patrick Mochel, Linus Torvalds; +Cc: linux-kernel

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.000000000 +0100
+++ linux-2.6.11-rc2/drivers/base/driver.c	2005-01-24 19:19:33.243501684 +0100
@@ -106,8 +106,8 @@
 
 void driver_unregister(struct device_driver * drv)
 {
-	bus_remove_driver(drv);
 	down(&drv->unload_sem);
+	bus_remove_driver(drv);
 	up(&drv->unload_sem);
 }
 
-- 
JiKos.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-02-02 23:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-24 18:25 [PATCH] fix bad locking in drivers/base/driver.c Jirka Kosina
2005-01-24 19:00 ` Chris Wright
2005-01-25  5:56 ` Greg KH
2005-01-25  7:32   ` Mike Waychison
2005-01-25 13:49     ` Bill Davidsen
2005-01-25 16:10       ` Mike Waychison
2005-01-25 16:27         ` Linus Torvalds
2005-01-25 19:19           ` Greg KH
2005-01-25 19:38             ` Thomas Gleixner
2005-02-02 23:35         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox