diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-02-27 22:05:45 +0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-02-27 13:37:09 -0500 |
commit | 2c9030eef9dbd0d737a7f55646da70d217fd6255 (patch) | |
tree | 69f1eafced52fef9d3939d8e1246d5063d14649a /fs/nfs/pnfs.c | |
parent | e9dbca8d732e20b8d31a3094a8669c014e7ee262 (diff) | |
download | linux-stable-2c9030eef9dbd0d737a7f55646da70d217fd6255.tar.gz linux-stable-2c9030eef9dbd0d737a7f55646da70d217fd6255.tar.bz2 linux-stable-2c9030eef9dbd0d737a7f55646da70d217fd6255.zip |
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>
Diffstat (limited to 'fs/nfs/pnfs.c')
0 files changed, 0 insertions, 0 deletions