mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 2.5.44 device_add double up() of device_sem
@ 2002-10-19  7:27 Andres Salomon
  0 siblings, 0 replies; only message in thread
From: Andres Salomon @ 2002-10-19  7:27 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

I noticed this while tracking down an oops.  If there's any sort of
error in device_add(), register_done is jumped to.  At that point,
device_sem is up()'d twice.  This patch fixes that.


-- 
It's not denial.  I'm just selective about the reality I accept.
	-- Bill Watterson

[-- Attachment #2: core.c.diff --]
[-- Type: text/plain, Size: 326 bytes --]

--- a/drivers/base/core.c	2002-10-19 02:45:26.000000000 -0400
+++ b/drivers/base/core.c	2002-10-19 03:07:35.000000000 -0400
@@ -59,7 +59,7 @@
 	devclass_add_device(dev);
  register_done:
 	if (error) {
-		up(&device_sem);
+		down(&device_sem);
 		list_del_init(&dev->g_list);
 		list_del_init(&dev->node);
 		up(&device_sem);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-19  7:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-19  7:27 [PATCH] 2.5.44 device_add double up() of device_sem Andres Salomon

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

all inboxes | Powered by JetHome®