]> git.baikalelectronics.ru Git - kernel.git/commit
net: Add lockdep asserts to ____napi_schedule().
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 11 Mar 2022 15:03:42 +0000 (16:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2022 10:09:28 +0000 (10:09 +0000)
commitdd30f625f3f883f97064d19e5ea9ae87dfb7ffee
treed0d852fb3a532af0b709b993879ecfe758bd0d71
parent56e271b1f0974f8afeac0883bd6ad7cf5e260b6b
net: Add lockdep asserts to ____napi_schedule().

____napi_schedule() needs to be invoked with disabled interrupts due to
__raise_softirq_irqoff (in order not to corrupt the per-CPU list).
____napi_schedule() needs also to be invoked from an interrupt context
so that the raised-softirq is processed while the interrupt context is
left.

Add lockdep asserts for both conditions.
While this is the second time the irq/softirq check is needed, provide a
generic lockdep_assert_softirq_will_run() which is used by both caller.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/lockdep.h
net/core/dev.c