Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a70b621 authored by Tuomas Tynkkynen's avatar Tuomas Tynkkynen Committed by Greg Kroah-Hartman
Browse files

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: default avatarTuomas Tynkkynen <ttynkkynen@nvidia.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e693739
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
}