* [PATCH net] octeon_ep: Fix host hang issue during device reboot
@ 2025-04-29 11:46 Sathesh B Edara
2025-04-30 17:00 ` Simon Horman
2025-05-01 14:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Sathesh B Edara @ 2025-04-29 11:46 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: hgani, vimleshk, Veerasenareddy Burru, Sathesh Edara, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Abhijit Ayarekar
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.
Fixes: 5cb96c29aa0e ("octeon_ep: add heartbeat monitor")
Signed-off-by: Sathesh B Edara <sedara@marvell.com>
---
drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
index 0a679e95196f..24499bb36c00 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
@@ -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();
}
--
2.36.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net] octeon_ep: Fix host hang issue during device reboot
2025-04-29 11:46 [PATCH net] octeon_ep: Fix host hang issue during device reboot Sathesh B Edara
@ 2025-04-30 17:00 ` Simon Horman
2025-05-01 14:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-04-30 17:00 UTC (permalink / raw)
To: Sathesh B Edara
Cc: netdev, linux-kernel, hgani, vimleshk, Veerasenareddy Burru,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Abhijit Ayarekar
On Tue, Apr 29, 2025 at 04:46:24AM -0700, Sathesh B Edara wrote:
> 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.
>
> Fixes: 5cb96c29aa0e ("octeon_ep: add heartbeat monitor")
> Signed-off-by: Sathesh B Edara <sedara@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] octeon_ep: Fix host hang issue during device reboot
2025-04-29 11:46 [PATCH net] octeon_ep: Fix host hang issue during device reboot Sathesh B Edara
2025-04-30 17:00 ` Simon Horman
@ 2025-05-01 14:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-01 14:20 UTC (permalink / raw)
To: Sathesh B Edara
Cc: netdev, linux-kernel, hgani, vimleshk, vburru, andrew+netdev,
davem, edumazet, kuba, pabeni, aayarekar
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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_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.
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-01 14:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29 11:46 [PATCH net] octeon_ep: Fix host hang issue during device reboot Sathesh B Edara
2025-04-30 17:00 ` Simon Horman
2025-05-01 14:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).