Skip to content

Commit

Permalink
xfs: remove incorrect error negation in attr_multi ioctl
Browse files Browse the repository at this point in the history
xfs_compat_attrmulti_by_handle() calls memdup_user() which returns a
negative error code. The error code is negated by the caller and thus
incorrectly converted to a positive error code.

Remove the error negation such that the negative error is passed
correctly back up to userspace.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
  • Loading branch information
Brian Foster authored and Dave Chinner committed Jan 21, 2015
1 parent 97bf6af commit 4d94902
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ xfs_compat_attrmulti_by_handle(

ops = memdup_user(compat_ptr(am_hreq.ops), size);
if (IS_ERR(ops)) {
error = -PTR_ERR(ops);
error = PTR_ERR(ops);
goto out_dput;
}

Expand Down

0 comments on commit 4d94902

Please sign in to comment.