Skip to content

Commit 90219fb

Browse files
committed
stmmac: intel: Add a missing clk_disable_unprepare() call in intel_eth_pci_remove()
jira VULN-71070 cve CVE-2022-50039 commit-author Christophe JAILLET <christophe.jaillet@wanadoo.fr> commit 5c23d6b Commit 09f012e ("stmmac: intel: Fix clock handling on error and remove paths") removed this clk_disable_unprepare() This was partly revert by commit ac322f8 ("net: stmmac: Fix clock handling on remove path") which removed this clk_disable_unprepare() because: " While unloading the dwmac-intel driver, clk_disable_unprepare() is being called twice in stmmac_dvr_remove() and intel_eth_pci_remove(). This causes kernel panic on the second call. " However later on, commit 5ec5582 ("net: stmmac: add clocks management for gmac driver") has updated stmmac_dvr_remove() which do not call clk_disable_unprepare() anymore. So this call should now be called from intel_eth_pci_remove(). Fixes: 5ec5582 ("net: stmmac: add clocks management for gmac driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/d7c8c1dadf40df3a7c9e643f76ffadd0ccc1ad1b.1660659689.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski <kuba@kernel.org> (cherry picked from commit 5c23d6b) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 043c592 commit 90219fb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,7 @@ static void intel_eth_pci_remove(struct pci_dev *pdev)
10331033

10341034
stmmac_dvr_remove(&pdev->dev);
10351035

1036+
clk_disable_unprepare(priv->plat->stmmac_clk);
10361037
clk_unregister_fixed_rate(priv->plat->stmmac_clk);
10371038

10381039
pcim_iounmap_regions(pdev, BIT(0));

0 commit comments

Comments
 (0)