hsr: Disable netpoll.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 29 Nov 2022 16:48:11 +0000 (17:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:22 +0000 (13:32 +0100)
commit3b79aaa88bab469449637218897bba75cf7364a8
tree7e759cbf4c72a7857f1012289daddf078182eff4
parent1517be0aef6df35534be71e3b9e9920ab9a675ab
hsr: Disable netpoll.

[ Upstream commit d5c7652eb16fa203d82546e0285136d7b321ffa9 ]

The hsr device is a software device. Its
net_device_ops::ndo_start_xmit() routine will process the packet and
then pass the resulting skb to dev_queue_xmit().
During processing, hsr acquires a lock with spin_lock_bh()
(hsr_add_node()) which needs to be promoted to the _irq() suffix in
order to avoid a potential deadlock.
Then there are the warnings in dev_queue_xmit() (due to
local_bh_disable() with disabled interrupts) left.

Instead trying to address those (there is qdisc and…) for netpoll sake,
just disable netpoll on hsr.

Disable netpoll on hsr and replace the _irqsave() locking with _bh().

Fixes: f421436a591d3 ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/hsr/hsr_device.c
net/hsr/hsr_forward.c