OSDN Git Service

esas2r: don't bother with __copy_to_user()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 19 Feb 2020 15:37:13 +0000 (10:37 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 23 Apr 2020 17:55:06 +0000 (13:55 -0400)
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>
drivers/scsi/esas2r/esas2r_ioctl.c

index 442c5e7..cc620f1 100644 (file)
@@ -1510,7 +1510,7 @@ ioctl_done:
        }
 
        /* 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)",