]> git.baikalelectronics.ru Git - kernel.git/commit
bpqether: fix rcu usage
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 31 Jul 2007 07:38:48 +0000 (00:38 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 31 Jul 2007 22:39:40 +0000 (15:39 -0700)
commit38c737b9e699a995745f53c9fff3a61c55d0ed26
tree51121142a8c6194def341ab7a647bbd293790111
parentcaa7bb852475f32aad1003418dd5e0147102be22
bpqether: fix rcu usage

The rcu_dereference() primitive needs to be applied to an l-value in order to
ensure that compiler writers don't get an opportunity to apply reordering
optimizations that could result in multiple fetches or in other misbehavior.
This patch pulls the rcu_dereference() calls in bpq_seq_next() up to the point
at which the fetched pointers are still l-values, rather than after
list_entry() has transformed them into r-values.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/net/hamradio/bpqether.c