[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190830231817.76862-2-joel@joelfernandes.org>
Date: Fri, 30 Aug 2019 19:18:17 -0400
From: "Joel Fernandes (Google)" <joel@...lfernandes.org>
To: linux-kernel@...r.kernel.org
Cc: "Joel Fernandes (Google)" <joel@...lfernandes.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Catalin Marinas <catalin.marinas@....com>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Jonathan Derrick <jonathan.derrick@...el.com>,
Keith Busch <keith.busch@...el.com>, linux-pci@...r.kernel.org,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Subject: [PATCH 2/2] ipc/sem: 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.
Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>
---
ipc/sem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ipc/sem.c b/ipc/sem.c
index 7da4504bcc7c..ec97a7072413 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -1852,7 +1852,8 @@ static struct sem_undo *__lookup_undo(struct sem_undo_list *ulp, int semid)
{
struct sem_undo *un;
- list_for_each_entry_rcu(un, &ulp->list_proc, list_proc) {
+ list_for_each_entry_rcu(un, &ulp->list_proc, list_proc,
+ spin_is_locked(&ulp->lock)) {
if (un->semid == semid)
return un;
}
--
2.23.0.187.g17f5b7556c-goog
Powered by blists - more mailing lists