]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
markers: fix markers read barrier for multiple probes
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Wed, 30 Jul 2008 18:20:05 +0000 (18:20 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Aug 2008 18:50:55 +0000 (11:50 -0700)
commit7e625dc756c7561c6805dc068c564fbad7b95f09
treeb360c612edddcceeec0b660ab3f3db01f5dcedf3
parent01d7669a29b5f6ee59e9adbca508544581fefd5d
markers: fix markers read barrier for multiple probes

commit 5def9a3a22e09c99717f41ab7f07ec9e1a1f3ec8 upstream

Paul pointed out two incorrect read barriers in the marker handler code in
the path where multiple probes are connected.  Those are ordering reads of
"ptype" (single or multi probe marker), "multi" array pointer, and "multi"
array data access.

It should be ordered like this :

read ptype
smp_rmb()
read multi array pointer
smp_read_barrier_depends()
access data referenced by multi array pointer

The code with a single probe connected (optimized case, does not have to
allocate an array) has correct memory ordering.

It applies to kernel 2.6.26.x, 2.6.25.x and linux-next.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/marker.c