Skip to content

Commit

Permalink
locking/percpu-rwsem: Add might_sleep() for writer locking
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Davidlohr Bueso authored and Ingo Molnar committed Feb 11, 2020
1 parent ac8dec4 commit 41f0e29
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/locking/percpu-rwsem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 41f0e29

Please sign in to comment.