]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: Fix an error code returned by a DAX ioctl
authorSanath Kumar <sanath.s.kumar@oracle.com>
Tue, 23 May 2017 01:48:02 +0000 (20:48 -0500)
committerShannon Nelson <shannon.nelson@oracle.com>
Fri, 2 Jun 2017 17:12:39 +0000 (10:12 -0700)
Orabug: 26132331

IOCTL for ccb submission failed due to get_user_pages error should
return EFAULT instead of EPERM. This was a regression introduced by a
prior patch that cleaned up a few functions in this code path.

Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
arch/sparc/dax/dax_main.c

index b0782a9f447645212710cc585b1aa2e50a2eeba9..7901f20a409ad526d7b90315088c8f8fe8a8f8de 100644 (file)
@@ -779,7 +779,7 @@ static int dax_ioctl_ccb_exec(void *arg, struct file *f)
 
        rv = dax_map_segment(dax_ctx, ccb_buf, usr_args.dce_ccb_buf_len);
        if (rv != 0)
-               return rv;
+               return -EFAULT;
 
        hv_rv = dax_ccb_hv_submit(dax_ctx, ccb_buf, usr_args.dce_ccb_buf_len,
                                  &usr_args);