]> git.baikalelectronics.ru Git - kernel.git/commit
net: forcedeth: Replace context and lock check with a lockdep_assert()
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 27 Oct 2020 22:54:42 +0000 (23:54 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 31 Oct 2020 16:55:30 +0000 (09:55 -0700)
commit1c1a2e56d239090016658a0cb0da302dde2ed0e6
tree3209e2e889c85775cc96ee95e0934daded8aeed3
parentc5e883fd9c4165a6e7ffebb8e4f1ec7c2400716a
net: forcedeth: Replace context and lock check with a lockdep_assert()

nv_update_stats() triggers a WARN_ON() when invoked from hard interrupt
context because the locks in use are not hard interrupt safe. It also has
an assert_spin_locked() which was the lock check before the lockdep era.

Lockdep has way broader locking correctness checks and covers both issues,
so replace the warning and the lock assert with lockdep_assert_held().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Rain River <rain.1986.08.12@gmail.com>
Cc: Zhu Yanjun <zyjzyj2000@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/nvidia/forcedeth.c