• Olaf Kirch's avatar
    [PATCH] Keep nfsd from exiting when seeing recv() errors · 93fbf1a5
    Olaf Kirch authored
    I submitted this one previously - svc_tcp_recvfrom currently returns
    any errors to the caller, including ECONNRESET and the like.
    
    This is something svc_recv isn't able to deal with:
    
    	len = svsk->sk_recvfrom(rqstp);
    	[...]
    	if (len == 0 || len == -EAGAIN) {
    		[...]
    		return -EAGAIN;
    	}
    
    	[...]
    	return len;
    
    The nfsd main loop will exit when it sees an error code other than
    EAGAIN.
    
    The following patch fixes this problem
    
    svc_recv is not equipped to deal with error codes other than EAGAIN,
    and will propagate anything else (such as ECONNRESET) up to nfsd,
    causing it to exit.
    Signed-off-by: default avatarOlaf Kirch <okir@suse.de>
    Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
    Cc: Neil Brown <neilb@cse.unsw.edu.au>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    93fbf1a5
svcsock.c 40 KB