Skip to content

Commit

Permalink
[PATCH] nfsd: sign conversion obscuring errors in nfsd_set_posix_acl()
Browse files Browse the repository at this point in the history
Assigning the result of posix_acl_to_xattr() to an unsigned data type
(size/size_t) obscures possible errors.

Coverity CID: 1206.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Florin Malita authored and Linus Torvalds committed May 21, 2006
1 parent 2adc7d4 commit 9ccfc29
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1922,11 +1922,10 @@ nfsd_set_posix_acl(struct svc_fh *fhp, int type, struct posix_acl *acl)
value = kmalloc(size, GFP_KERNEL);
if (!value)
return -ENOMEM;
size = posix_acl_to_xattr(acl, value, size);
if (size < 0) {
error = size;
error = posix_acl_to_xattr(acl, value, size);
if (error < 0)
goto getout;
}
size = error;
} else
size = 0;

Expand Down

0 comments on commit 9ccfc29

Please sign in to comment.