Skip to content

Commit 7687201

Browse files
author
Peter Zijlstra
committed
locking/rwbase: Properly match set_and_save_state() to restore_state()
Noticed while looking at the readers race. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 6880fa6 commit 7687201

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/locking/rwbase_rt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static int __sched rwbase_write_lock(struct rwbase_rt *rwb,
220220
for (; atomic_read(&rwb->readers);) {
221221
/* Optimized out for rwlocks */
222222
if (rwbase_signal_pending_state(state, current)) {
223-
__set_current_state(TASK_RUNNING);
223+
rwbase_restore_current_state();
224224
__rwbase_write_unlock(rwb, 0, flags);
225225
return -EINTR;
226226
}

0 commit comments

Comments
 (0)