]> 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 17:04:14 +0000 (10:04 -0700)
commit66156e6f66b648a7ca7f23e659552eed2db7bb9e
tree6ad8976cb18b76a8dac12576dfd51ae003626657
parent30e8f45d7687bcc6ac4010ea37ae78d8e365d2b7
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