octeon_ep: Fix host hang issue during device reboot
Subsystems (3)
Sathesh B Edara
maintainerPATCH 1/1 octeon_ep: Fix host hang issue during device reboot
When the host loses heartbeat messages from the device, the driver calls the device-specific ndo_stop function, which frees the resources. If the driver is unloaded in this scenario, it calls ndo_stop again, attempting to free resources that have already been freed, leading to a host hang issue. To resolve this, dev_close should be called instead of the device-specific stop function.dev_close internally calls ndo_stop to stop the network interface and performs additional cleanup tasks. During the driver unload process, if the device is already down, ndo_stop is not called.
--- drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeon_ep/octep_main.c +1 -1
@@ -1223,7 +1223,7 @@ static void octep_hb_timeout_task(struct work_struct *work) miss_cnt);rtnl_lock ();if (netif_running (oct->netdev)) -octep_stop (oct->netdev); +dev_close (oct->netdev);rtnl_unlock (); }
Signature · 1 line
2.36.0
Quoted 12 lines · Sathesh B Edara
When the host loses heartbeat messages from the device, the driver calls the device-specific
ndo_stopfunction, which frees the resources. If the driver is unloaded in this scenario, it callsndo_stopagain, attempting to free resources that have already been freed, leading to a host hang issue. To resolve this,dev_closeshould be called instead of the device-specific stop function.dev_close internally callsndo_stopto stop the network interface and performs additional cleanup tasks. During the driver unload process, if the device is already down,ndo_stopis not called.
Quoted 2 lines
Fixes 5cb96c29aa0e ("octeon_ep: add heartbeat monitor")Signed-off-by Sathesh B Edara <[email protected]>
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 12 lines · On Tue, 29 Apr 2025 04:46:24 -0700 you wrote:
When the host loses heartbeat messages from the device, the driver calls the device-specific
ndo_stopfunction, which frees the resources. If the driver is unloaded in this scenario, it callsndo_stopagain, attempting to free resources that have already been freed, leading to a host hang issue. To resolve this,dev_closeshould be called instead of the device-specific stop function.dev_close internally callsndo_stopto stop the network interface and performs additional cleanup tasks. During the driver unload process, if the device is already down,ndo_stopis not called.
Quoted 1 line
[...]
Here is the summary with links:
- [net] octeon_ep: Fix host hang issue during device reboot
https://git.kernel.org/netdev/net/c/34f42736b325
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html