kernel-hacking-2024-linux-s.../net/sunrpc
Stanislav Kinsbursky 2c9030eef9 SUNRPC: check RPC inode's pipe reference before dereferencing
There are 2 tightly bound objects: pipe data (created for kernel needs, has
reference to dentry, which depends on PipeFS mount/umount) and PipeFS
dentry/inode pair (created on mount for user-space needs). They both
independently may have or have not a valid reference to each other.
This means, that we have to make sure, that pipe->dentry reference is valid on
upcalls, and dentry->pipe reference is valid on downcalls. The latter check is
absent - my fault.
IOW, PipeFS dentry can be opened by some process (rpc.idmapd for example), but
it's pipe data can belong to NFS mount, which was unmounted already and thus
pipe data was destroyed.
To fix this, pipe reference have to be set to NULL on rpc_unlink() and checked
on PipeFS file operations instead of pipe->dentry check.

Note: PipeFS "poll" file operation will be updated in next patch, because it's
logic is more complicated.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2012-02-27 13:37:09 -05:00
..
auth_gss SUNRPC: create GSS auth cache per network namespace 2012-01-31 19:28:15 -05:00
xprtrdma SUNRPC: create svc_xprt in proper network namespace 2011-12-06 16:20:42 -05:00
addr.c SUNRPC: parametrize rpc_uaddr2sockaddr() by network context 2012-01-31 19:28:12 -05:00
auth.c
auth_generic.c SUNRPC: Fix machine creds in generic_create_cred and generic_match 2012-01-23 14:03:46 -08:00
auth_null.c
auth_unix.c NFS/sunrpc: don't use a credential with extra groups. 2011-10-25 11:20:58 +02:00
backchannel_rqst.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
bc_svc.c
cache.c SUNRPC: generic cache register routines removed 2012-01-31 19:28:16 -05:00
clnt.c SUNRPC: release per-net clients lock before calling PipeFS dentries creation 2012-02-27 13:36:16 -05:00
Kconfig
Makefile
netns.h SUNRPC: create GSS auth cache per network namespace 2012-01-31 19:28:15 -05:00
rpc_pipe.c SUNRPC: check RPC inode's pipe reference before dereferencing 2012-02-27 13:37:09 -05:00
rpcb_clnt.c SUNRPC: constify the rpc_program 2012-01-31 19:28:20 -05:00
sched.c SUNRPC: Ensure that we can trace waitqueues when !defined(CONFIG_SYSCTL) 2012-02-15 00:19:51 -05:00
socklib.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
stats.c NFS: include filelayout DS rpc stats in mountstats 2012-02-17 13:39:47 -05:00
sunrpc.h SUNRPC: subscribe RPC clients to pipefs notifications 2012-01-31 18:20:25 -05:00
sunrpc_syms.c SUNRPC: init per-net rpcbind spinlock 2012-02-16 14:00:48 -05:00
svc.c Lockd: per-net up and down routines introduced 2012-02-15 00:19:47 -05:00
svc_xprt.c SUNRPC: service destruction in network namespace context 2012-02-15 00:19:45 -05:00
svcauth.c
svcauth_unix.c SUNRPC: ip map cache per network namespace cleanup 2012-01-31 19:28:16 -05:00
svcsock.c SUNRPC: fixup for namespace changes 2012-01-31 19:28:22 -05:00
sysctl.c SUNRPC: make SUNPRC clients list per network namespace context 2012-01-31 18:20:25 -05:00
timer.c
xdr.c NFSv4: include bitmap in nfsv4 get acl data 2012-01-05 10:42:42 -05:00
xprt.c NFS: include filelayout DS rpc stats in mountstats 2012-02-17 13:39:47 -05:00
xprtsock.c SUNRPC: add sending,pending queue and max slot to xprt stats 2012-02-16 14:55:27 -05:00