projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6880fa6
)
locking/rwbase: Properly match set_and_save_state() to restore_state()
author
Peter Zijlstra
<peterz@infradead.org>
Thu, 9 Sep 2021 10:59:17 +0000
(12:59 +0200)
committer
Peter Zijlstra
<peterz@infradead.org>
Wed, 15 Sep 2021 15:49:15 +0000
(17:49 +0200)
Noticed while looking at the readers race.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Will Deacon <will@kernel.org>
Link:
https://lkml.kernel.org/r/20210909110203.828203010@infradead.org
kernel/locking/rwbase_rt.c
patch
|
blob
|
history
diff --git
a/kernel/locking/rwbase_rt.c
b/kernel/locking/rwbase_rt.c
index
4ba1508
..
542b017
100644
(file)
--- a/
kernel/locking/rwbase_rt.c
+++ b/
kernel/locking/rwbase_rt.c
@@
-220,7
+220,7
@@
static int __sched rwbase_write_lock(struct rwbase_rt *rwb,
for (; atomic_read(&rwb->readers);) {
/* Optimized out for rwlocks */
if (rwbase_signal_pending_state(state, current)) {
-
__set_current_state(TASK_RUNNING
);
+
rwbase_restore_current_state(
);
__rwbase_write_unlock(rwb, 0, flags);
return -EINTR;
}