Skip to content

Commit b2ed0a4

Browse files
ahalaneyrostedt
authored andcommitted
locking/rwsem-rt: Remove might_sleep() in __up_read()
There's no chance of sleeping here, the reader is giving up the lock and possibly waking up the writer who is waiting on it. Reported-by: Chunyu Hu <[email protected]> Signed-off-by: Andrew Halaney <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent d0faab8 commit b2ed0a4

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/locking/rwsem-rt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ void __up_read(struct rw_semaphore *sem)
198198
if (!atomic_dec_and_test(&sem->readers))
199199
return;
200200

201-
might_sleep();
202201
raw_spin_lock_irq(&m->wait_lock);
203202
/*
204203
* Wake the writer, i.e. the rtmutex owner. It might release the

0 commit comments

Comments
 (0)