Skip to content

Commit 984035a

Browse files
joelagneltorvalds
authored andcommitted
ipc/sem.c: convert to use built-in RCU list checking
CONFIG_PROVE_RCU_LIST requires list_for_each_entry_rcu() to pass a lockdep expression if using srcu or locking for protection. It can only check regular RCU protection, all other protection needs to be passed as lockdep expression. Link: http://lkml.kernel.org/r/20190830231817.76862-2-joel@joelfernandes.org Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com> Cc: Jonathan Derrick <jonathan.derrick@intel.com> Cc: Keith Busch <keith.busch@intel.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent c231740 commit 984035a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎ipc/sem.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,8 @@ static struct sem_undo *__lookup_undo(struct sem_undo_list *ulp, int semid)
18521852
{
18531853
struct sem_undo *un;
18541854

1855-
list_for_each_entry_rcu(un, &ulp->list_proc, list_proc) {
1855+
list_for_each_entry_rcu(un, &ulp->list_proc, list_proc,
1856+
spin_is_locked(&ulp->lock)) {
18561857
if (un->semid == semid)
18571858
return un;
18581859
}

0 commit comments

Comments
 (0)