diff options
author | Tuomas Tynkkynen <ttynkkynen@nvidia.com> | 2014-06-17 16:17:40 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-10 01:25:22 +0200 |
commit | 6a70b621227d1fd3efd150fce63ea4d51d4acaa9 (patch) | |
tree | 8c5f0e0c2e03917735f5334dd6c0a62bb9ab61ab /drivers/usb/host/ehci-tegra.c | |
parent | USB: ehci-pci: USB host controller support for Intel Quark X1000 (diff) | |
download | linux-6a70b621227d1fd3efd150fce63ea4d51d4acaa9.tar.xz linux-6a70b621227d1fd3efd150fce63ea4d51d4acaa9.zip |
USB: EHCI: tegra: Fix use-after-free in .remove()
The tegra_ehci_hcd structure is located in the private space allocated
by the core USB code so it must not be accessed after the HCD is
freed.
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index c303371f67bc..693f792aa7f5 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -479,10 +479,11 @@ static int tegra_ehci_remove(struct platform_device *pdev) usb_phy_shutdown(hcd->phy); usb_remove_hcd(hcd); - usb_put_hcd(hcd); clk_disable_unprepare(tegra->clk); + usb_put_hcd(hcd); + return 0; } |