Re: commit 554f76962d3a6eb5110415f1591aca83f96a84ae hangs USB forvmware 7.0.1

From: Heinz Diehl
Date: Sat Mar 06 2010 - 13:48:31 EST


On 06.03.2010, Oliver Neukum wrote:

> From: Oliver Neukum <oliver@xxxxxxxxxx>
> Date: Sat, 6 Mar 2010 12:09:41 +0100
> Subject: [PATCH] usb: usbfs: Fix deadlock of khubd
>
> 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);
> }

I had a bug on my system which occured when I connected an USB mp3
player more than once:

When plugged in the first time, the device worked as expected. After
pulling it, it didn't get recognized again when plugged it.
Only a reboot did help. 2.6.33 final is fine, 2.6.33-gitX isn't.

Your patch, applied to -git11, did fix this.

Thanks,
Heinz.
--
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/