android_kernel_xiaomi_sm8350/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
8021q
appletalk
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
ethernet
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
llc
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
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
unix
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
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
socket.c [NET]: Fix net/socket.c warnings. 2007-02-08 15:06:08 -08:00
sysctl_net.c
TUNABLE