[tip: locking/core] locking/percpu-rwsem: Add might_sleep() for writer locking
From: tip-bot2 for Davidlohr Bueso
Date: Tue Feb 11 2020 - 07:49:24 EST
The following commit has been merged into the locking/core branch of tip:
Commit-ID: 41f0e29190ac9e38099a37abd1a8a4cb1dc21233
Gitweb: https://git.kernel.org/tip/41f0e29190ac9e38099a37abd1a8a4cb1dc21233
Author: Davidlohr Bueso <dave@xxxxxxxxxxxx>
AuthorDate: Tue, 07 Jan 2020 17:33:04 -08:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Tue, 11 Feb 2020 13:11:02 +01:00
locking/percpu-rwsem: Add might_sleep() for writer locking
We are missing this annotation in percpu_down_write(). Correct
this.
Signed-off-by: Davidlohr Bueso <dbueso@xxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Acked-by: Will Deacon <will@xxxxxxxxxx>
Acked-by: Waiman Long <longman@xxxxxxxxxx>
Link: https://lkml.kernel.org/r/20200108013305.7732-1-dave@xxxxxxxxxxxx
---
kernel/locking/percpu-rwsem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/locking/percpu-rwsem.c b/kernel/locking/percpu-rwsem.c
index 8048a9a..183a3aa 100644
--- a/kernel/locking/percpu-rwsem.c
+++ b/kernel/locking/percpu-rwsem.c
@@ -212,6 +212,7 @@ static bool readers_active_check(struct percpu_rw_semaphore *sem)
void percpu_down_write(struct percpu_rw_semaphore *sem)
{
+ might_sleep();
rwsem_acquire(&sem->dep_map, 0, 0, _RET_IP_);
/* Notify readers to take the slow path. */