From: Al Viro Date: Fri, 20 Oct 2006 06:28:44 +0000 (-0700) Subject: [PATCH] bug: nfsd/nfs4xdr.c misuse of ERR_PTR() X-Git-Tag: v2.6.19-rc3~82 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc45f0175088e000ac7493e5e3f05579b6f7d240;p=pandora-kernel.git [PATCH] bug: nfsd/nfs4xdr.c misuse of ERR_PTR() a) ERR_PTR(nfserr_something) is a bad idea; IS_ERR() will be false for it. b) mixing nfserr_.... with -EOPNOTSUPP is even worse idea. nfsd4_path() does both; caller expects to get NFS protocol error out it if anything goes wrong, but if it does we either do not notice (see (a)) or get host-endian negative (see (b)). IOW, that's a case when we can't use ERR_PTR() to return error, even though we return a pointer in case of success. Signed-off-by: Al Viro Acked-by: Trond Myklebust Acked-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed