summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-11-05 09:03:18 +0100
committerAdrian Bunk <bunk@stusta.de>2006-11-05 09:03:18 +0100
commit0ac0a20823b92bf2bd39aa83c59c247b41ba3e44 (patch)
treeb2f9b07ed8cd10abe80df85b6f004b2ce572e876 /net/ipv6
parentfe8187b80c7b4fee6fd5dfb0d68891230ae59dcb (diff)
downloadlinux-stable-0ac0a20823b92bf2bd39aa83c59c247b41ba3e44.tar.gz
linux-stable-0ac0a20823b92bf2bd39aa83c59c247b41ba3e44.tar.bz2
linux-stable-0ac0a20823b92bf2bd39aa83c59c247b41ba3e44.zip
knfsd: Fix race that can disable NFS server.
This is a long standing bug that seems to have only recently become apparent, presumably due to increasing use of NFS over TCP - many distros seem to be making it the default. The SK_CONN bit gets set when a listening socket may be ready for an accept, just as SK_DATA is set when data may be available. It is entirely possible for svc_tcp_accept to be called with neither of these set. It doesn't happen often but there is a small race in svc_sock_enqueue as SK_CONN and SK_DATA are tested outside the spin_lock. They could be cleared immediately after the test and before the lock is gained. This normally shouldn't be a problem. The sockets are non-blocking so trying to read() or accept() when ther is nothing to do is not a problem. However: svc_tcp_recvfrom makes the decision "Should I accept() or should I read()" based on whether SK_CONN is set or not. This usually works but is not safe. The decision should be based on whether it is a TCP_LISTEN socket or a TCP_CONNECTED socket. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'net/ipv6')
0 files changed, 0 insertions, 0 deletions