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: f421436a59
("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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
8cee8543f0
commit
28921ec555
@@ -437,7 +437,6 @@ static void handle_std_frame(struct sk_buff *skb,
|
||||
{
|
||||
struct hsr_port *port = frame->port_rcv;
|
||||
struct hsr_priv *hsr = port->hsr;
|
||||
unsigned long irqflags;
|
||||
|
||||
frame->skb_hsr = NULL;
|
||||
frame->skb_prp = NULL;
|
||||
@@ -447,10 +446,10 @@ static void handle_std_frame(struct sk_buff *skb,
|
||||
frame->is_from_san = true;
|
||||
} else {
|
||||
/* Sequence nr for the master node */
|
||||
spin_lock_irqsave(&hsr->seqnr_lock, irqflags);
|
||||
spin_lock_bh(&hsr->seqnr_lock);
|
||||
frame->sequence_nr = hsr->sequence_nr;
|
||||
hsr->sequence_nr++;
|
||||
spin_unlock_irqrestore(&hsr->seqnr_lock, irqflags);
|
||||
spin_unlock_bh(&hsr->seqnr_lock);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user