]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
skd: use regular version of copy_from_user()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Sep 2013 07:55:23 +0000 (10:55 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Sep 2013 16:59:57 +0000 (10:59 -0600)
The other __copy_from_user() calls have access_ok() checks so they are
fine, but these two don't have the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/skd_main.c

index 6fc0296aff36cae05f6150afe517a09f3055b4a3..dfd05a941e6727b7a92bfad5c6c31b56b6b41ce2 100644 (file)
@@ -1736,7 +1736,7 @@ static int skd_sg_io_get_and_check_args(struct skd_device *skdev,
                return -EINVAL;
        }
 
-       if (__copy_from_user(sksgio->cdb, sgp->cmdp, sgp->cmd_len)) {
+       if (copy_from_user(sksgio->cdb, sgp->cmdp, sgp->cmd_len)) {
                DPRINTK(skdev, "copy_from_user cmdp failed %p\n", sgp->cmdp);
                return -EFAULT;
        }
@@ -1767,7 +1767,7 @@ static int skd_sg_io_get_and_check_args(struct skd_device *skdev,
                sksgio->iov = iov;
                sksgio->iovcnt = sgp->iovec_count;
 
-               if (__copy_from_user(iov, sgp->dxferp, nbytes)) {
+               if (copy_from_user(iov, sgp->dxferp, nbytes)) {
                        DPRINTK(skdev, "copy_from_user iovec failed %p\n",
                                sgp->dxferp);
                        return -EFAULT;