[PATCH] 2.5.44 device_add double up() of device_sem

Andres Salomon (dilinger@mp3revolution.net)
Sat, 19 Oct 2002 03:27:27 -0400


--5vNYLRcllDrimb99
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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

--5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="core.c.diff"

--- 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);

--5vNYLRcllDrimb99-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/


/font>