]> 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)
commit111df1db87baef9b8b50af825790bd71db588381
treed0d852fb3a532af0b709b993879ecfe758bd0d71
parenta4e9d67290749c0aa9695305effe9af39ebd7ca6
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