From: Davidlohr Bueso Date: Wed, 8 Jan 2020 01:33:04 +0000 (-0800) Subject: locking/percpu-rwsem: Add might_sleep() for writer locking X-Git-Tag: v5.15~4235^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41f0e29190ac9e38099a37abd1a8a4cb1dc21233;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Will Deacon Acked-by: Waiman Long Link: https://lkml.kernel.org/r/20200108013305.7732-1-dave@stgolabs.net --- 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. */