[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130913075523.GE19211@elgon.mountain>
Date: Fri, 13 Sep 2013 10:55:23 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Jens Axboe <axboe@...nel.dk>
Cc: Jeff Moyer <jmoyer@...hat.com>,
Ramprasad Chinthekindi <rchinthekindi@...c-inc.com>,
Akhil Bhansali <abhansali@...c-inc.com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch 1/4] skd: use regular version of copy_from_user()
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@...cle.com>
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 6fc0296..dfd05a9 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists