]> git.karo-electronics.de Git - karo-tx-linux.git/commit
SUNRPC: Add barriers to ensure read ordering in rpc_wake_up_task_queue_locked
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 25 Mar 2013 15:23:40 +0000 (11:23 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 16:25:44 +0000 (09:25 -0700)
commit4a5f3c127942a1c5bdcdc06de9bbe2dff529ab64
tree4fef0486be962ebf9dc65b369c9a288c4bfdb0ab
parentaa4cfdeb17e3559fe1e80175c7338e065553dce5
SUNRPC: Add barriers to ensure read ordering in rpc_wake_up_task_queue_locked

commit 1166fde6a923c30f4351515b6a9a1efc513e7d00 upstream.

We need to be careful when testing task->tk_waitqueue in
rpc_wake_up_task_queue_locked, because it can be changed while we
are holding the queue->lock.
By adding appropriate memory barriers, we can ensure that it is safe to
test task->tk_waitqueue for equality if the RPC_TASK_QUEUED bit is set.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/sched.c