linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] seqlock: fix raw_read_seqcount_latch()
@ 2016-05-21 20:14 Alexey Dobriyan
  2016-05-22 10:48 ` Peter Zijlstra
  2016-05-27 11:11 ` [PATCH] seqlock: fix raw_read_seqcount_latch() Peter Zijlstra
  0 siblings, 2 replies; 12+ messages in thread
From: Alexey Dobriyan @ 2016-05-21 20:14 UTC (permalink / raw)
  To: akpm; +Cc: peterz, linux-kernel

lockless_dereference() is supposed to take pointer not integer.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/seqlock.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -277,7 +277,7 @@ static inline void raw_write_seqcount_barrier(seqcount_t *s)
 
 static inline int raw_read_seqcount_latch(seqcount_t *s)
 {
-	return lockless_dereference(s->sequence);
+	return lockless_dereference(s)->sequence;
 }
 
 /**
@@ -331,7 +331,7 @@ static inline int raw_read_seqcount_latch(seqcount_t *s)
  *	unsigned seq, idx;
  *
  *	do {
- *		seq = lockless_dereference(latch->seq);
+ *		seq = lockless_dereference(latch)->seq;
  *
  *		idx = seq & 0x01;
  *		entry = data_query(latch->data[idx], ...);

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-06-08 14:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-21 20:14 [PATCH] seqlock: fix raw_read_seqcount_latch() Alexey Dobriyan
2016-05-22 10:48 ` Peter Zijlstra
2016-05-22 18:50   ` Alexey Dobriyan
2016-05-23  9:36     ` Peter Zijlstra
2016-05-25 19:57       ` Tejun Heo
2016-05-25 20:11         ` [PATCH] percpu: Revert ("percpu: Replace smp_read_barrier_depends() with lockless_dereference()") Tejun Heo
2016-06-03 10:58   ` [tip:locking/core] locking/barriers: Validate lockless_dereference() is used on a pointer type tip-bot for Peter Zijlstra
2016-06-06 21:31     ` Mateusz Guzik
2016-06-07  7:10       ` Peter Zijlstra
2016-06-08 14:19   ` tip-bot for Peter Zijlstra
2016-05-27 11:11 ` [PATCH] seqlock: fix raw_read_seqcount_latch() Peter Zijlstra
2016-06-03 10:46   ` [tip:locking/core] locking/seqcount: Re-fix raw_read_seqcount_latch() tip-bot for Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).