mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 16:25:34 +00:00
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>
This commit is contained in:
parent
6e693739e9
commit
6a70b62122
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue