OSDN Git Service

nvmet: Pass lockdep expression to RCU lists
authorAmol Grover <frextrite@gmail.com>
Sat, 11 Jan 2020 07:38:16 +0000 (13:08 +0530)
committerKeith Busch <kbusch@kernel.org>
Mon, 3 Feb 2020 18:00:24 +0000 (03:00 +0900)
commit4ac76436a6d07dec1c3c766f234aa787a16e8f65
treed7c1251090e080d7033661dbcd35c093a0155983
parentc92bddee77353a773f0df76115c1a01877ce1eae
nvmet: Pass lockdep expression to RCU lists

ctrl->subsys->namespaces and subsys->namespaces are traversed with
list_for_each_entry_rcu outside an RCU read-side critical section but
under the protection of ctrl->subsys->lock and subsys->lock respectively.

Hence, add the corresponding lockdep expression to the list traversal
primitive to silence false-positive lockdep warnings, and harden RCU
lists.

Reported-by: kbuild test robot <lkp@intel.com>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Amol Grover <frextrite@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/core.c