lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F0ECE29.3060109@mvista.com>
Date:	Thu, 12 Jan 2012 16:12:25 +0400
From:	Sergei Shtylyov <sshtylyov@...sta.com>
To:	Tomoya MORINAGA <tomoya.rohm@...il.com>
CC:	Felipe Balbi <balbi@...com>, Greg Kroah-Hartman <gregkh@...e.de>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	qi.wang@...el.com, yong.y.wang@...el.com, joel.clark@...el.com,
	kok.howg.ewe@...el.com
Subject: Re: [PATCH 1/6 v2] usb/gadget/pch_udc: Fix disconnect issue

Hello.

On 12-01-2012 6:27, Tomoya MORINAGA wrote:

> ISSUE:
> When the driver notifies a gadget of a disconnect event, a system rarely freezes.

> CAUSE:
> When the driver calls dev->driver->disconnect(), it is not calling spinlock().

    spin_unlock(), you mean?

> Signed-off-by: Tomoya MORINAGA<tomoya.rohm@...il.com>
> ---
> V2: Divide into 6 patches
> ---
>   drivers/usb/gadget/pch_udc.c |    5 ++++-
>   1 files changed, 4 insertions(+), 1 deletions(-)

> diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c
> index f222659..a4f8b08 100644
> --- a/drivers/usb/gadget/pch_udc.c
> +++ b/drivers/usb/gadget/pch_udc.c
> @@ -2340,8 +2340,11 @@ static void pch_udc_svc_ur_interrupt(struct pch_udc_dev *dev)
>   		/* Complete request queue */
>   		empty_req_queue(ep);
>   	}
> -	if (dev->driver&&  dev->driver->disconnect)
> +	if (dev->driver&&  dev->driver->disconnect) {
> +		spin_unlock(&dev->lock);
>   		dev->driver->disconnect(&dev->gadget);
> +		spin_lock(&dev->lock);
> +	}

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ