39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
From 02af6d2bc04f659443c6844b6c2eb3311fc16a9f Mon Sep 17 00:00:00 2001
|
|
From: Julia Cartwright <julia@ni.com>
|
|
Date: Thu, 26 Apr 2018 15:02:03 -0500
|
|
Subject: [PATCH 363/365] seqlock: provide the same ordering semantics as
|
|
mainline
|
|
|
|
The mainline implementation of read_seqbegin() orders prior loads w.r.t.
|
|
the read-side critical section. Fixup the RT writer-boosting
|
|
implementation to provide the same guarantee.
|
|
|
|
Also, while we're here, update the usage of ACCESS_ONCE() to use
|
|
READ_ONCE().
|
|
|
|
Fixes: e69f15cf77c23 ("seqlock: Prevent rt starvation")
|
|
Cc: stable-rt@vger.kernel.org
|
|
Signed-off-by: Julia Cartwright <julia@ni.com>
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
(cherry picked from commit afa4c06b89a3c0fb7784ff900ccd707bef519cb7)
|
|
Signed-off-by: Julia Cartwright <julia@ni.com>
|
|
---
|
|
include/linux/seqlock.h | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
|
|
index b6d15b2f597a..961e07b762dd 100644
|
|
--- a/include/linux/seqlock.h
|
|
+++ b/include/linux/seqlock.h
|
|
@@ -468,6 +468,7 @@ static inline unsigned read_seqbegin(seqlock_t *sl)
|
|
spin_unlock_wait(&sl->lock);
|
|
goto repeat;
|
|
}
|
|
+ smp_rmb();
|
|
return ret;
|
|
}
|
|
#endif
|
|
--
|
|
2.28.0
|
|
|