kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Jeff Moyer <jmoyer@redhat.com>,
	Ramprasad Chinthekindi <rchinthekindi@stec-inc.com>,
	Akhil Bhansali <abhansali@stec-inc.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch 1/4] skd: use regular version of copy_from_user()
Date: Fri, 13 Sep 2013 07:55:23 +0000	[thread overview]
Message-ID: <20130913075523.GE19211@elgon.mountain> (raw)

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;

             reply	other threads:[~2013-09-13  7:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13  7:55 Dan Carpenter [this message]
2013-09-13 17:00 ` [patch 1/4] skd: use regular version of copy_from_user() Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130913075523.GE19211@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=abhansali@stec-inc.com \
    --cc=axboe@kernel.dk \
    --cc=jmoyer@redhat.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rchinthekindi@stec-inc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).