2.5.44 device_add double up() of device_sem
PATCH 1/1 2.5.44 device_add double up() of device_sem
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.
Signature · 2 lines
It's not denial. I'm just selective about the reality I accept. -- Bill Watterson
drivers/base/core.c +1 -1
@@ -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);