summaryrefslogtreecommitdiff
path: root/lib/parser.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-01-04 22:12:47 +0300
committerJ. Bruce Fields <bfields@redhat.com>2011-01-05 00:49:25 +0300
commitfdef7aa5d4020fd94ffcbf0078d6bd9e5a111e19 (patch)
tree270c2b03e9cb5cf5451b0e229c5a328727ef743a /lib/parser.c
parent6bab93f87ec703bf6650875881b11f9f27d7da56 (diff)
downloadlinux-fdef7aa5d4020fd94ffcbf0078d6bd9e5a111e19.tar.xz
svcrpc: ensure cache_check caller sees updated entry
Supposes cache_check runs simultaneously with an update on a different CPU: cache_check task doing update ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ 1. test for CACHE_VALID 1'. set entry->data & !CACHE_NEGATIVE 2. use entry->data 2'. set CACHE_VALID If the two memory writes performed in step 1' and 2' appear misordered with respect to the reads in step 1 and 2, then the caller could get stale data at step 2 even though it saw CACHE_VALID set on the cache entry. Add memory barriers to prevent this. Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'lib/parser.c')
0 files changed, 0 insertions, 0 deletions