Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d6ccfacb authored by Michel Lespinasse's avatar Michel Lespinasse Committed by Samuel Pascua
Browse files

rwsem: do not block readers at head of queue if other readers are active



This change fixes a race condition where a reader might determine it
needs to block, but by the time it acquires the wait_lock the rwsem
has active readers and no queued waiters.

In this situation the reader can just in parallel with the existing active
readers; it does not need to block until the active readers complete.

Thanks to Peter Hurley for noticing this possible race.

Signed-off-by: default avatarMichel Lespinasse <walken@google.com>
parent 9e3f6b5e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment