* [patch 1/4] skd: use regular version of copy_from_user()
@ 2013-09-13 7:55 Dan Carpenter
2013-09-13 17:00 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-09-13 7:55 UTC (permalink / raw)
To: Jens Axboe
Cc: Jeff Moyer, Ramprasad Chinthekindi, Akhil Bhansali, linux-kernel,
kernel-janitors
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>
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-13 17:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-13 7:55 [patch 1/4] skd: use regular version of copy_from_user() Dan Carpenter
2013-09-13 17:00 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).