* [PATCH TRIVIAL] linux-2.5.31/drivers/scsi/sg.c
@ 2002-08-22 18:04 Silvio Cesare
0 siblings, 0 replies; only message in thread
From: Silvio Cesare @ 2002-08-22 18:04 UTC (permalink / raw)
To: linux-kernel; +Cc: silvio
[-- 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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-08-22 18:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-22 18:04 [PATCH TRIVIAL] linux-2.5.31/drivers/scsi/sg.c Silvio Cesare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox