Prevent netif_tx_disable() running concurrently with dev_watchdog() by
taking the device global xmit lock. Otherwise, the recommended:
netif_carrier_off(dev);
netif_tx_disable(dev);
driver shutdown sequence can happen after the watchdog has already
checked carrier, resulting in possible false alarms. This is because
netif_tx_lock() only sets the frozen bit without maintaining the locks
on the individual queues.
Fixes: c3f26a269c24 ("netdev: Fix lockdep warnings in multiqueue configurations.")
Signed-off-by: Edwin Peer <redacted>
---
include/linux/netdevice.h | 2 ++
1 file changed, 2 insertions(+)
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-02-08 20:03:01
On Fri, 5 Feb 2021 17:37:32 -0800 Edwin Peer wrote:
Prevent netif_tx_disable() running concurrently with dev_watchdog() by
taking the device global xmit lock. Otherwise, the recommended:
netif_carrier_off(dev);
netif_tx_disable(dev);
driver shutdown sequence can happen after the watchdog has already
checked carrier, resulting in possible false alarms. This is because
netif_tx_lock() only sets the frozen bit without maintaining the locks
on the individual queues.
Fixes: c3f26a269c24 ("netdev: Fix lockdep warnings in multiqueue configurations.")
Signed-off-by: Edwin Peer <redacted>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Even though using the dev->tx_global_lock as a barrier is not very
clean in itself the thinking is that this restores previous semantics
with deeper changes.
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Fri, 5 Feb 2021 17:37:32 -0800 you wrote:
Prevent netif_tx_disable() running concurrently with dev_watchdog() by
taking the device global xmit lock. Otherwise, the recommended:
netif_carrier_off(dev);
netif_tx_disable(dev);
driver shutdown sequence can happen after the watchdog has already
checked carrier, resulting in possible false alarms. This is because
netif_tx_lock() only sets the frozen bit without maintaining the locks
on the individual queues.
[...]