]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
SUNRPC: Prevent an rpc_task wakeup race
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 22 May 2013 16:57:24 +0000 (12:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Jun 2013 19:52:50 +0000 (12:52 -0700)
commitd52bd6ede0250d1bdf389e2d0be2cd63640a5828
tree20ed82d3d3f40d0b36ba89695fcfd81a821d32ff
parent09493e200a8db589a359a5bf0cd44777c8a540d2
SUNRPC: Prevent an rpc_task wakeup race

commit a3c3cac5d31879cd9ae2de7874dc6544ca704aec upstream.

The lockless RPC_IS_QUEUED() test in __rpc_execute means that we need to
be careful about ordering the calls to rpc_test_and_set_running(task) and
rpc_clear_queued(task). If we get the order wrong, then we may end up
testing the RPC_TASK_RUNNING flag after __rpc_execute() has looped
and changed the state of the rpc_task.

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