diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-04-27 13:27:39 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-04-27 14:10:01 -0400 |
commit | db0a9593d52f935c80085d8993bdcead1ad30b0c (patch) | |
tree | e0ca32d8d4366042479cb2a87d6fe87998a9849f /fs/nfs/nfs4proc.c | |
parent | 31e4dda4747713de13889f7c79c7aec341fea61b (diff) |
NFS: Handle exceptions coming out of nfs4_proc_fs_locations()
We don't want to return -NFS4ERR_WRONGSEC to the VFS because it could
cause the kernel to oops.
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 2ce069880d6b..ff7571f12bb8 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -4921,7 +4921,7 @@ static void nfs_fixup_referral_attributes(struct nfs_fattr *fattr) | |||
4921 | fattr->nlink = 2; | 4921 | fattr->nlink = 2; |
4922 | } | 4922 | } |
4923 | 4923 | ||
4924 | int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name, | 4924 | static int _nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name, |
4925 | struct nfs4_fs_locations *fs_locations, struct page *page) | 4925 | struct nfs4_fs_locations *fs_locations, struct page *page) |
4926 | { | 4926 | { |
4927 | struct nfs_server *server = NFS_SERVER(dir); | 4927 | struct nfs_server *server = NFS_SERVER(dir); |
@@ -4961,6 +4961,19 @@ int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name, | |||
4961 | return status; | 4961 | return status; |
4962 | } | 4962 | } |
4963 | 4963 | ||
4964 | int nfs4_proc_fs_locations(struct inode *dir, const struct qstr *name, | ||
4965 | struct nfs4_fs_locations *fs_locations, struct page *page) | ||
4966 | { | ||
4967 | struct nfs4_exception exception = { }; | ||
4968 | int err; | ||
4969 | do { | ||
4970 | err = nfs4_handle_exception(NFS_SERVER(dir), | ||
4971 | _nfs4_proc_fs_locations(dir, name, fs_locations, page), | ||
4972 | &exception); | ||
4973 | } while (exception.retry); | ||
4974 | return err; | ||
4975 | } | ||
4976 | |||
4964 | static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct nfs4_secinfo_flavors *flavors) | 4977 | static int _nfs4_proc_secinfo(struct inode *dir, const struct qstr *name, struct nfs4_secinfo_flavors *flavors) |
4965 | { | 4978 | { |
4966 | int status; | 4979 | int status; |