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]
Date:	Fri, 12 Dec 2014 14:51:42 +0100
From:	Krzysztof Opasiak <k.opasiak@...sung.com>
To:	Robert Baldyga <r.baldyga@...sung.com>, balbi@...com
Cc:	gregkh@...uxfoundation.org, peter.chen@...escale.com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	Marek Szyprowski <m.szyprowski@...sung.com>
Subject: RE: [PATCH] usb: gadget: udc-core: call udc_stop() before gadget unbind



> -----Original Message-----
> From: Robert Baldyga [mailto:r.baldyga@...sung.com]
> Sent: Friday, December 12, 2014 2:17 PM
> To: balbi@...com
> Cc: gregkh@...uxfoundation.org; peter.chen@...escale.com; linux-
> usb@...r.kernel.org; linux-kernel@...r.kernel.org;
> m.szyprowski@...sung.com; k.opasiak@...sung.com; Robert Baldyga
> Subject: [PATCH] usb: gadget: udc-core: call udc_stop() before
> gadget unbind
> 
> As usb function drivers assumes that all usb request will be
> completed
> before function unbind call, we should supply such behavior. In
> some
> cases ep_disable() won't kill all request effectively, because some
> IN requests can be in running state. In such situation it's
> possible
> to have unbind function called before last request completion,
> which
> can cause problems.
> 
> For example unbinding f_ecm function while request on 'notify'
> endpoint
> is not completed, ends up NULL pointer dereference in unbind()
> function.
> 
> usb_gadget_udc_stop() call causes completion of all requests so if
> it's
> called before gadget unbind there is no risk that some of requests
> will
> stay uncompleted.
> 
> Signed-off-by: Robert Baldyga <r.baldyga@...sung.com>

This finally solves issue described before in [1]

Tested-by: Krzysztof Opasiak <k.opasiak@...sung.com>

Footnotes:
1 - https://lkml.org/lkml/2014/12/9/283

-- 
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
k.opasiak@...sung.com




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