lkml.org 
[lkml]   [2020]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip: locking/core] locking/percpu-rwsem: Add might_sleep() for writer locking
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@stgolabs.net>
AuthorDate: Tue, 07 Jan 2020 17:33:04 -08:00
Committer: Ingo Molnar <mingo@kernel.org>
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@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
---
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. */
\
 
 \ /
  Last update: 2020-02-11 13:50    [W:0.036 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site