]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc2: fix memory corruption in dwc2 driver
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>
Tue, 4 Feb 2014 19:21:24 +0000 (11:21 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Feb 2014 20:59:14 +0000 (12:59 -0800)
commitd292490f19821e78e97b9a3b94a2096ce894118d
treef2446587ac2ada418ddedb81dd1eca45245127fc
parenta13ee24ee8a3508fdb5f608e490a943ccbfbb5e9
usb: dwc2: fix memory corruption in dwc2 driver

The move from the staging tree to the main tree exposed a
longstanding memory corruption bug in the dwc2 driver. The
reordering of the driver initialization caused the dwc2 driver
to corrupt the initialization data of the sdhci driver on the
Raspberry Pi platform, which made the bug show up.

The error is in calling to_usb_device(hsotg->dev), since ->dev
is not a member of struct usb_device. The easiest fix is to
just remove the offending code, since it is not really needed.

Thanks to Stephen Warren for tracking down the cause of this.

Reported-by: Andre Heider <a.heider@gmail.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/hcd.c