[PATCH] usb: usbfs: Fix deadlock of khubd

From: Oliver Neukum
Date: Sat Mar 06 2010 - 06:09:41 EST


The caller of usbfs_conn_disc_event() already holds usbfs_mutex.
Don't take it again.

Signed-off-by: Oliver Neukum <neukum@xxxxxxxxxxxxx>
---
drivers/usb/core/devices.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index c83c975..08def6b 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -155,11 +155,10 @@ static const struct class_info clas_info[] =

/*****************************************************************/

+/* the caller holds usbfs_mutex */
void usbfs_conn_disc_event(void)
{
- mutex_lock(&usbfs_mutex);
conndiscevcnt++;
- mutex_unlock(&usbfs_mutex);
wake_up(&deviceconndiscwq);
}

--
1.6.4.2

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