Skip to content

Commit 543e2e2

Browse files
committed
mlxbf_gige: stop PHY during open() error paths
jira LE-1907 cve CVE-2024-35907 Rebuild_History Non-Buildable kernel-5.14.0-427.28.1.el9_4 commit-author David Thompson <davthompson@nvidia.com> commit d6c30c5 The mlxbf_gige_open() routine starts the PHY as part of normal initialization. The mlxbf_gige_open() routine must stop the PHY during its error paths. Fixes: f92e186 ("Add Mellanox BlueField Gigabit Ethernet driver") Signed-off-by: David Thompson <davthompson@nvidia.com> Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit d6c30c5) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 073183b commit 543e2e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static int mlxbf_gige_open(struct net_device *netdev)
158158

159159
err = mlxbf_gige_tx_init(priv);
160160
if (err)
161-
goto free_irqs;
161+
goto phy_deinit;
162162
err = mlxbf_gige_rx_init(priv);
163163
if (err)
164164
goto tx_deinit;
@@ -186,6 +186,9 @@ static int mlxbf_gige_open(struct net_device *netdev)
186186
tx_deinit:
187187
mlxbf_gige_tx_deinit(priv);
188188

189+
phy_deinit:
190+
phy_stop(phydev);
191+
189192
free_irqs:
190193
mlxbf_gige_free_irqs(priv);
191194
return err;

0 commit comments

Comments
 (0)