summaryrefslogtreecommitdiffstats
path: root/kernel/locking
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2020-01-08 02:33:04 +0100
committerIngo Molnar <mingo@kernel.org>2020-02-11 13:11:02 +0100
commit41f0e29190ac9e38099a37abd1a8a4cb1dc21233 (patch)
tree6be0cb6216fc9925a68630c95389641d3db778ed /kernel/locking
parentlocking/percpu-rwsem: Fold __percpu_up_read() (diff)
downloadlinux-41f0e29190ac9e38099a37abd1a8a4cb1dc21233.tar.xz
linux-41f0e29190ac9e38099a37abd1a8a4cb1dc21233.zip
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@suse.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Will Deacon <will@kernel.org> Acked-by: Waiman Long <longman@redhat.com> Link: https://lkml.kernel.org/r/20200108013305.7732-1-dave@stgolabs.net
Diffstat (limited to 'kernel/locking')
-rw-r--r--kernel/locking/percpu-rwsem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/locking/percpu-rwsem.c b/kernel/locking/percpu-rwsem.c
index 8048a9a255d5..183a3aaa8509 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. */