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)
commitfbd9a2ceba5c74bbfa19cf257ae4b4b2c820860d
treed0d852fb3a532af0b709b993879ecfe758bd0d71
parentd96657dc9238f8e9bda47b377e17e7c6f90935af
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