Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d4395e03fec0895d01451904b8a2276ceda663c9 Commit: d4395e03fec0895d01451904b8a2276ceda663c9 Parent: aefa89d178e6dd83889b66d4e800d4d77363900b Author: J. Bruce Fields <[EMAIL PROTECTED]> AuthorDate: Fri Oct 26 13:32:50 2007 -0400 Committer: J. Bruce Fields <[EMAIL PROTECTED]> CommitDate: Fri Feb 1 16:42:01 2008 -0500
knfsd: fix broken length check in nfs4idmap.c Obviously at some point we thought "error" represented the length when positive. This appears to be a long-standing typo. Thanks to Prasad Potluri <[EMAIL PROTECTED]> for finding the problem and proposing an earlier version of this patch. Cc: Steve French <[EMAIL PROTECTED]> Cc: Prasad V Potluri <[EMAIL PROTECTED]> Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]> --- fs/nfsd/nfs4idmap.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index 4c0c683..5b56c77 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c @@ -255,13 +255,10 @@ idtoname_parse(struct cache_detail *cd, char *buf, int buflen) goto out; if (len == 0) set_bit(CACHE_NEGATIVE, &ent.h.flags); - else { - if (error >= IDMAP_NAMESZ) { - error = -EINVAL; - goto out; - } + else if (len >= IDMAP_NAMESZ) + goto out; + else memcpy(ent.name, buf1, sizeof(ent.name)); - } error = -ENOMEM; res = idtoname_update(&ent, res); if (res == NULL) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html