diff options
author | Paul E. McKenney | 2023-08-01 09:30:18 -0700 |
---|---|---|
committer | Frederic Weisbecker | 2023-09-11 23:00:32 +0200 |
commit | 730c3ed4ba30feadfb20b4d4d18e869bc00348f6 (patch) | |
tree | 248c7a7bc39c4dcf9d8b6d5dad7ad6e20741aa4b | |
parent | 0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff) |
refscale: Fix misplaced data re-read
This commit fixes a misplaced data re-read in the typesafe code.
The reason that this was not noticed is that this is a performance test
with no writers, so a mismatch could not occur.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
-rw-r--r-- | kernel/rcu/refscale.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c index 91a0fd0d4d9a..750a63e99539 100644 --- a/kernel/rcu/refscale.c +++ b/kernel/rcu/refscale.c @@ -655,12 +655,12 @@ retry: goto retry; } un_delay(udl, ndl); + b = READ_ONCE(rtsp->a); // Remember, seqlock read-side release can fail. if (!rts_release(rtsp, start)) { rcu_read_unlock(); goto retry; } - b = READ_ONCE(rtsp->a); WARN_ONCE(a != b, "Re-read of ->a changed from %u to %u.\n", a, b); b = rtsp->b; rcu_read_unlock(); |