diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2022-11-29 19:48:11 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-12-02 07:26:21 +0300 |
commit | d5c7652eb16fa203d82546e0285136d7b321ffa9 (patch) | |
tree | e98c92e28017a77f928408f6d45017bcf26daa1f /net/hsr/hsr_forward.c | |
parent | 0c74d9f79ec4299365bbe803baa736ae0068179e (diff) | |
download | linux-d5c7652eb16fa203d82546e0285136d7b321ffa9.tar.xz |
hsr: Disable netpoll.
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>
Diffstat (limited to 'net/hsr/hsr_forward.c')
-rw-r--r-- | net/hsr/hsr_forward.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c index a8befa35841e..a828221335bd 100644 --- a/net/hsr/hsr_forward.c +++ b/net/hsr/hsr_forward.c @@ -500,7 +500,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; @@ -510,10 +509,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); } } |