[PATCH 1/1] Revert "nfsd: correctly handle return value from nfsd_map_name_to_*"
Luis Henriques
luis.henriques at canonical.com
Fri Sep 5 09:48:18 UTC 2014
BugLink: http://bugs.launchpad.net/bugs/1365914
This reverts commit 0a69d50207d9e098eeb98b516b1b08b4d05dbc6f, which was
commit 47c85291d3dd1a51501555000b90f8e281a0458e upstream.
Neil Brown reported[1] in the stable mailing list that
commit 63d059e73ff4574b79bd8aa252b5fc00b6326ddf
Author: NeilBrown <neilb at suse.de>
Date: Wed Feb 16 13:08:35 2011 +1100
nfsd: correctly handle return value from nfsd_map_name_to_*
commit 47c85291d3dd1a51501555000b90f8e281a0458e upstream.
in kernel 2.6.32.30 fixes a regression introduced by commit
3c726023402a2f3b28f49b9d90ebf9e71151157d. However, this commit hasn't been
backported to the 2.6.32 kernel.
So, rather an fixing a regression, it introduces one and this patch should be
reverted.
For more details, see https://bugzilla.novell.com/show_bug.cgi?id=893787
[1] http://www.spinics.net/lists/linux-nfs/msg46403.html
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
fs/nfsd/nfs4xdr.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index ab87b056b0c8..05990b61e9da 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -323,8 +323,8 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
READ_BUF(dummy32);
len += (XDR_QUADLEN(dummy32) << 2);
READMEM(buf, dummy32);
- if ((status = nfsd_map_name_to_uid(argp->rqstp, buf, dummy32, &iattr->ia_uid)))
- return status;
+ if ((host_err = nfsd_map_name_to_uid(argp->rqstp, buf, dummy32, &iattr->ia_uid)))
+ goto out_nfserr;
iattr->ia_valid |= ATTR_UID;
}
if (bmval[1] & FATTR4_WORD1_OWNER_GROUP) {
@@ -334,8 +334,8 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
READ_BUF(dummy32);
len += (XDR_QUADLEN(dummy32) << 2);
READMEM(buf, dummy32);
- if ((status = nfsd_map_name_to_gid(argp->rqstp, buf, dummy32, &iattr->ia_gid)))
- return status;
+ if ((host_err = nfsd_map_name_to_gid(argp->rqstp, buf, dummy32, &iattr->ia_gid)))
+ goto out_nfserr;
iattr->ia_valid |= ATTR_GID;
}
if (bmval[1] & FATTR4_WORD1_TIME_ACCESS_SET) {
--
1.9.1
More information about the kernel-team
mailing list