public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Silvio Cesare <silvio@qualys.com>
To: linux-kernel@vger.kernel.org
Cc: silvio@qualys.com
Subject: [PATCH TRIVIAL] linux-2.5.31/drivers/scsi/sg.c
Date: Thu, 22 Aug 2002 11:04:43 -0700	[thread overview]
Message-ID: <20020822110443.A8182@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 125 bytes --]

remove 1 verify_area call which is directly followed with a __copy_to_user,
and replace with just a copy_to_user.

--
Silvio

[-- Attachment #2: patch.2.5.31.sg --]
[-- Type: text/plain, Size: 630 bytes --]

diff -u linux-2.5.31/drivers/scsi/sg.c dev/linux-2.5.31/drivers/scsi/sg.c
--- linux-2.5.31/drivers/scsi/sg.c	Sat Aug 10 18:41:28 2002
+++ dev/linux-2.5.31/drivers/scsi/sg.c	Thu Aug 22 11:02:29 2002
@@ -493,9 +493,7 @@
 	    sb_len = (hp->mx_sb_len > sb_len) ? sb_len : hp->mx_sb_len;
 	    len = 8 + (int)srp->sense_b[7]; /* Additional sense length field */
 	    len = (len > sb_len) ? sb_len : len;
-	    if ((err = verify_area(VERIFY_WRITE, hp->sbp, len)))
-		goto err_out;
-	    if (__copy_to_user(hp->sbp, srp->sense_b, len)) {
+	    if (copy_to_user(hp->sbp, srp->sense_b, len)) {
 		err = -EFAULT;
 		goto err_out;
 	    }

                 reply	other threads:[~2002-08-22 18:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20020822110443.A8182@localhost.localdomain \
    --to=silvio@qualys.com \
    --cc=linux-kernel@vger.kernel.org \
    /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