Skip to content

Commit

Permalink
locking/rwsem-rt: Remove might_sleep() in __up_read()
Browse files Browse the repository at this point in the history
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 <chuhu@redhat.com>
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
ahalaney authored and rostedt committed Aug 20, 2021
1 parent d0faab8 commit b2ed0a4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion kernel/locking/rwsem-rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ void __up_read(struct rw_semaphore *sem)
if (!atomic_dec_and_test(&sem->readers))
return;

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

0 comments on commit b2ed0a4

Please sign in to comment.