Subject: net: Dequeue in dev_cpu_dead() without the lock
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed Sep 16 16:15:39 2020 +0200

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Upstream uses skb_dequeue() to acquire lock of `input_pkt_queue'. The reason is
to synchronize against a remote CPU which still thinks that the CPU is online
enqueues packets to this CPU.
There are no guarantees that the packet is enqueued before the callback is run,
it just hope.
RT however complains about an not initialized lock because it uses another lock
for `input_pkt_queue' due to the IRQ-off nature of the context.

Use the unlocked dequeue version for `input_pkt_queue'.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>


---
 net/core/dev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
@ net/core/dev.c:11313 @ static int dev_cpu_dead(unsigned int old
 		netif_rx_ni(skb);
 		input_queue_head_incr(oldsd);
 	}
-	while ((skb = skb_dequeue(&oldsd->input_pkt_queue))) {
+	while ((skb = __skb_dequeue(&oldsd->input_pkt_queue))) {
 		netif_rx_ni(skb);
 		input_queue_head_incr(oldsd);
 	}