kernel-fxtec-pro1x/include/linux/sunrpc
Chuck Lever abc5c44d62 SUNRPC: Fix error return value of svc_addr_len()
The svc_addr_len() helper function returns -EAFNOSUPPORT if it doesn't
recognize the address family of the passed-in socket address.  However,
the return type of this function is size_t, which means -EAFNOSUPPORT
is turned into a very large positive value in this case.

The check in svc_udp_recvfrom() to see if the return value is less
than zero therefore won't work at all.

Additionally, handle_connect_req() passes this value directly to
memset().  This could cause memset() to clobber a large chunk of memory
if svc_addr_len() has returned an error.  Currently the address family
of these addresses, however, is known to be supported long before
handle_connect_req() is called, so this isn't a real risk.

Change the error return value of svc_addr_len() to zero, which fits in
the range of size_t, and is safer to pass to memset() directly.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2009-04-28 13:54:25 -04:00
..
auth.h
auth_gss.h
cache.h
clnt.h rpc: pass target name down to rpc level on callbacks 2008-12-23 16:17:40 -05:00
debug.h
gss_api.h
gss_asn1.h
gss_err.h
gss_krb5.h
gss_spkm3.h
Kbuild
metrics.h
msg_prot.h
rpc_pipe_fs.h rpc: add an rpc_pipe_open method 2008-12-23 16:08:32 -05:00
rpc_rdma.h
sched.h
stats.h
svc.h Merge branch 'for-2.6.30' of git://linux-nfs.org/~bfields/linux 2009-04-06 13:25:56 -07:00
svc_rdma.h
svc_xprt.h SUNRPC: Fix error return value of svc_addr_len() 2009-04-28 13:54:25 -04:00
svcauth.h
svcauth_gss.h nfsd: pass client principal name in rsc downcall 2008-12-23 16:17:15 -05:00
svcsock.h
timer.h
types.h
xdr.h nfs: replace uses of __constant_{endian} 2009-03-18 17:30:51 -04:00
xprt.h SUNRPC: Add the equivalent of the linger and linger2 timeouts to RPC sockets 2009-03-19 15:17:34 -04:00
xprtrdma.h
xprtsock.h