linux-stable/net
Jeff Layton 7086721f9c SUNRPC: have svc_recv() check kthread_should_stop()
When using kthreads that call into svc_recv, we want to make sure that
they do not block there for a long time when we're trying to take down
the kthread.

This patch changes svc_recv() to check kthread_should_stop() at the same
places that it checks to see if it's signalled(). Also check just before
svc_recv() tries to schedule(). By making sure that we check it just
after setting the task state we can avoid having to use any locking or
signalling to ensure it doesn't block for a long time.

There's still a chance of a 500ms sleep if alloc_page() fails, but
that should be a rare occurrence and isn't a terribly long time in
the context of a kthread being taken down.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-04-23 16:13:36 -04:00
..
9p Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-03 14:33:42 -07:00
802 [TR] net/802/tr.c: sysctl_tr_rif_timeout static 2008-01-31 19:28:31 -08:00
8021q [VLAN]: Handle vlan devices net namespace changing. 2008-04-16 00:57:01 -07:00
appletalk [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS. 2008-03-26 04:39:53 +09:00
atm Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
ax25 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-02 22:35:23 -07:00
bridge Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.26 2008-04-14 03:50:43 -07:00
can CAN: use hrtimers in can-bcm protocol 2008-04-15 19:29:14 -07:00
core Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-23 12:23:45 -07:00
dccp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-23 12:23:45 -07:00
decnet [NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS. 2008-03-26 04:39:55 +09:00
econet [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS. 2008-03-26 04:39:53 +09:00
ethernet [NET]: Return more appropriate error from eth_validate_addr(). 2008-04-13 22:45:40 -07:00
ieee80211 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
ipv4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-23 12:23:45 -07:00
ipv6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-23 12:23:45 -07:00
ipx [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS. 2008-03-26 04:39:53 +09:00
irda [IRDA]: Remove irlan_eth_send_gratuitous_arp() 2008-04-15 00:29:24 -07:00
iucv iucv: Delay bus registration until core is ready. 2008-04-10 02:12:45 -07:00
key [IPSEC]: Fix catch-22 with algorithm IDs above 31 2008-04-22 00:46:42 -07:00
lapb [LAPB] net/lapb/lapb_iface.c: use LIST_HEAD instead of LIST_HEAD_INIT 2008-01-28 14:56:52 -08:00
llc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-02 22:35:23 -07:00
mac80211 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
netfilter netfilter: Fix SIP conntrack build with NAT disabled. 2008-04-19 17:53:52 -07:00
netlabel [NETLABEL]: Fix NULL deref in netlbl_unlabel_staticlist_gen() if ifindex not found 2008-04-17 23:22:54 -07:00
netlink Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 2008-04-18 18:18:30 -07:00
netrom [NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS. 2008-03-26 04:39:55 +09:00
packet [NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS. 2008-03-26 04:39:55 +09:00
rfkill rfkill: Fix device type check when toggling states 2008-04-15 15:04:35 -04:00
rose [ROSE]: Fix soft lockup wrt. rose_node_list_lock 2008-04-20 15:58:07 -07:00
rxrpc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
sched Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-04-17 23:56:30 -07:00
sctp SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked. 2008-04-17 14:22:18 -07:00
sunrpc SUNRPC: have svc_recv() check kthread_should_stop() 2008-04-23 16:13:36 -04:00
tipc [TIPC]: Cleanup of TIPC reference table code 2008-04-16 18:22:20 -07:00
unix [PATCH] r/o bind mounts: get callers of vfs_mknod/create/mkdir() 2008-04-19 00:25:34 -04:00
wanrouter [WANROUTER]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:15:56 -08:00
wireless Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-14 02:30:23 -07:00
x25 [NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS. 2008-03-26 04:39:55 +09:00
xfrm [IPSEC]: Fix catch-22 with algorithm IDs above 31 2008-04-22 00:46:42 -07:00
compat.c [NETFILTER]: ip6_tables: add compat support 2008-01-28 14:58:36 -08:00
Kconfig [IPV4]: Fix size description of CONFIG_INET. 2008-03-04 15:18:22 +09:00
Makefile [CAN]: Add PF_CAN core module 2008-01-28 14:54:10 -08:00
nonet.c
socket.c net: Unexport move_addr_to_{kernel,user} 2008-04-23 03:37:49 -07:00
sysctl_net.c [NET]: Remove the empty net_table 2008-01-28 14:56:29 -08:00
TUNABLE