linux/net
Christophe Saout cc4dc59e55 Subject: Re: [PATCH] Fix SUNRPC wakeup/execute race condition
The sunrpc scheduler contains a race condition that can let an RPC
task end up being neither running nor on any wait queue. The race takes
place between rpc_make_runnable (called from rpc_wake_up_task) and
__rpc_execute under the following condition:

First __rpc_execute calls tk_action which puts the task on some wait
queue. The task is dequeued by another process before __rpc_execute
continues its execution. While executing rpc_make_runnable exactly after
setting the task `running' bit and before clearing the `queued' bit
__rpc_execute picks up execution, clears `running' and subsequently
both functions fall through, both under the false assumption somebody
else took the job.

Swapping rpc_test_and_set_running with rpc_clear_queued in
rpc_make_runnable fixes that hole. This introduces another possible
race condition that can be handled by checking for `queued' after
setting the `running' bit.

Bug noticed on a 4-way x86_64 system under XEN with an NFSv4 server
on the same physical machine, apparently one of the few ways to hit
this race condition at all.

Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Christophe Saout <christophe@saout.de>
Signed-off-by: Trond Myklebust <trond.myklebust@fys.uio.no>
2006-12-06 10:46:24 -05:00
..
802 [NET]: Kill direct includes of asm/checksum.h 2006-12-02 21:22:59 -08:00
8021q
appletalk [PATCH] severing skbuff.h -> highmem.h 2006-12-04 02:00:29 -05:00
atm [ATM]: Kill ipcommon.[ch] 2006-12-02 21:32:08 -08:00
ax25 [AX25]: Use kmemdup 2006-12-02 21:24:01 -08:00
bluetooth
bridge [EBTABLES]: Split ebt_replace into user and kernel variants, annotate. 2006-12-02 21:32:05 -08:00
core [PATCH] severing skbuff.h -> highmem.h 2006-12-04 02:00:29 -05:00
dccp [DCCP] tfrc: Binary search for reverse TFRC lookup 2006-12-03 14:53:27 -02:00
decnet [RTNETLINK]: Add rtnl_put_cacheinfo() to unify some code 2006-12-02 21:30:44 -08:00
econet
ethernet [NET]: Kill direct includes of asm/checksum.h 2006-12-02 21:22:59 -08:00
ieee80211 [PATCH] severing skbuff.h -> mm.h 2006-12-04 02:00:34 -05:00
ipv4 [PATCH] severing skbuff.h -> mm.h 2006-12-04 02:00:34 -05:00
ipv6 [NETFILTER]: Mark old IPv4-only connection tracking scheduled for removal 2006-12-02 22:11:01 -08:00
ipx
irda [PATCH] severing skbuff.h -> mm.h 2006-12-04 02:00:34 -05:00
key [IPSEC]: Add AF_KEY interface for encapsulation family. 2006-12-02 21:31:50 -08:00
lapb
llc
netfilter [PATCH] severing skbuff.h -> mm.h 2006-12-04 02:00:34 -05:00
netlabel NetLabel: convert to an extensibile/sparse category bitmap 2006-12-02 21:31:36 -08:00
netlink [GENETLINK]: Add cmd dump completion. 2006-12-02 21:32:09 -08:00
netrom [NETROM]: Use kmemdup 2006-12-02 21:24:02 -08:00
packet [PATCH] severing skbuff.h -> highmem.h 2006-12-04 02:00:29 -05:00
rose [ROSE] rose_add_loopback_node: propagate -E 2006-12-02 22:17:48 -08:00
rxrpc [NET]: Kill direct includes of asm/checksum.h 2006-12-02 21:22:59 -08:00
sched [PKT_SCHED] act_gact: division by zero 2006-12-02 21:32:11 -08:00
sctp [SCTP]: Use kzalloc where appropriate 2006-12-02 21:30:19 -08:00
sunrpc Subject: Re: [PATCH] Fix SUNRPC wakeup/execute race condition 2006-12-06 10:46:24 -05:00
tipc [TIPC]: Use kzalloc where appropriate 2006-12-02 21:30:21 -08:00
unix [NET]: Annotate csum_partial() callers in net/* 2006-12-02 21:23:32 -08:00
wanrouter
x25
xfrm [XFRM] xfrm_user: Better validation of user templates. 2006-12-03 19:19:26 -08:00
compat.c
Kconfig [NETFILTER]: remove the reference to ipchains from Kconfig 2006-12-02 21:31:35 -08:00
Makefile
nonet.c
socket.c [NET]: The scheduled removal of the frame diverter. 2006-12-02 21:22:23 -08:00
sysctl_net.c
TUNABLE