linux/net
NeilBrown aaf68cfbf2 [PATCH] knfsd: fix a race in closing NFSd connections
If you lose this race, it can iput a socket inode twice and you get a BUG
in fs/inode.c

When I added the option for user-space to close a socket, I added some
cruft to svc_delete_socket so that I could call that function when closing
a socket per user-space request.

This was the wrong thing to do.  I should have just set SK_CLOSE and let
normal mechanisms do the work.

Not only wrong, but buggy.  The locking is all wrong and it openned up a
race where-by a socket could be closed twice.

So this patch:
  Introduces svc_close_socket which sets SK_CLOSE then either leave
  the close up to a thread, or calls svc_delete_socket if it can
  get SK_BUSY.

  Adds a bias to sk_busy which is removed when SK_DEAD is set,
  This avoid races around shutting down the socket.

  Changes several 'spin_lock' to 'spin_lock_bh' where the _bh
  was missing.

Bugzilla-url: http://bugzilla.kernel.org/show_bug.cgi?id=7916

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:25:47 -08:00
..
802 [NET]: Kill direct includes of asm/checksum.h 2006-12-02 21:22:59 -08:00
8021q [PATCH] Finish annotations of struct vlan_ethhdr 2006-10-10 16:15:34 -07:00
appletalk [PATCH] severing skbuff.h -> highmem.h 2006-12-04 02:00:29 -05:00
atm [ATM]: Fix for crash in adummy_init() 2007-02-08 12:38:53 -08:00
ax25 [AX.25]: Fix unchecked ax25_linkfail_register uses 2006-12-17 21:59:11 -08:00
bluetooth [PATCH] hidp __user annotations 2007-02-09 09:14:06 -08:00
bridge [NET]: Add UDPLITE support in a few missing spots 2007-02-08 12:39:14 -08:00
core [NET]: unregister_netdevice as void 2007-02-08 12:39:06 -08:00
dccp [NET]: change layout of ehash table 2007-02-08 14:16:46 -08:00
decnet [NETLINK]: Don't BUG on undersized allocations 2007-02-08 12:38:41 -08:00
econet [NET]: Conversions from kmalloc+memset to k(z|c)alloc. 2006-07-21 14:51:30 -07:00
ethernet [NET]: Kill direct includes of asm/checksum.h 2006-12-02 21:22:59 -08:00
ieee80211 [PATCH] softmac: avoid assert in ieee80211softmac_wx_get_rate 2007-02-05 16:58:42 -05:00
ipv4 [NET]: change layout of ehash table 2007-02-08 14:16:46 -08:00
ipv6 [NET]: change layout of ehash table 2007-02-08 14:16:46 -08:00
ipx [IPX]: Fix NULL pointer dereference on ipx unload 2007-02-08 16:02:21 -08:00
irda [IRLAN]: handle out of memory errors 2007-02-08 12:39:08 -08:00
iucv [S390]: Add AF_IUCV socket support 2007-02-08 13:51:54 -08:00
key [PFKEYV2]: Extension for dynamic update of endpoint address(es) 2007-02-08 13:14:33 -08:00
lapb [LAPB]: Fix windowsize check 2006-08-05 21:15:58 -07:00
llc [LLC]: anotations 2006-12-02 21:21:23 -08:00
netfilter [NETFILTER]: add IPv6-capable TCPMSS target 2007-02-08 12:39:16 -08:00
netlabel NetLabel: correct CIPSO tag handling when adding new DOI definitions 2007-01-09 00:30:01 -08:00
netlink [AF_NETLINK]: module_put cleanup 2007-01-03 18:38:15 -08:00
netrom [AX.25]: Fix unchecked ax25_linkfail_register uses 2006-12-17 21:59:11 -08:00
packet [PACKET]: Fix skb->cb clobbering between aux and sockaddr 2007-02-08 12:38:47 -08:00
rose [AX.25]: Fix unchecked rose_add_loopback_neigh uses 2006-12-17 21:59:14 -08:00
rxrpc [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
sched [NETFILTER]: {ip,ip6}_tables: use struct xt_table instead of redefined structure names 2007-02-08 12:39:20 -08:00
sctp [SCTP]: Force update of the rto when processing HB-ACK 2007-01-30 14:36:14 -08:00
sunrpc [PATCH] knfsd: fix a race in closing NFSd connections 2007-02-09 09:25:47 -08:00
tipc [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
unix [PATCH] struct path: convert unix 2006-12-08 08:28:50 -08:00
wanrouter [NET] net/wanrouter/wanmain.c: cleanups 2007-02-08 12:38:54 -08:00
x25 [X.25]: Adds /proc/net/x25/forward to view active forwarded calls. 2007-02-08 13:35:18 -08:00
xfrm Merge branch 'HEAD' of master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6 2007-02-08 15:25:18 -08:00
compat.c [NET]: File descriptor loss while receiving SCM_RIGHTS 2006-10-11 23:59:48 -07:00
Kconfig [S390]: Rewrite of the IUCV base code, part 2 2007-02-08 13:37:42 -08:00
Makefile [S390]: Rewrite of the IUCV base code, part 2 2007-02-08 13:37:42 -08:00
nonet.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
socket.c [NET]: Fix net/socket.c warnings. 2007-02-08 15:06:08 -08:00
sysctl_net.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
TUNABLE