Skip to content

Commit

Permalink
esas2r: don't bother with __copy_to_user()
Browse files Browse the repository at this point in the history
sure, we'd done copy_from_user() on the same range, so we can
skip access_ok()... and it's not worth bothering.  Just use
copy_to_user().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Apr 23, 2020
1 parent 8f3d9f3 commit 3d3185a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/esas2r/esas2r_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1510,7 +1510,7 @@ int esas2r_ioctl_handler(void *hostdata, unsigned int cmd, void __user *arg)
}

/* Always copy the buffer back, if only to pick up the status */
err = __copy_to_user(arg, ioctl, sizeof(struct atto_express_ioctl));
err = copy_to_user(arg, ioctl, sizeof(struct atto_express_ioctl));
if (err != 0) {
esas2r_log(ESAS2R_LOG_WARN,
"ioctl_handler copy_to_user didn't copy everything (err %d, cmd %u)",
Expand Down

0 comments on commit 3d3185a

Please sign in to comment.