lkml.org 
[lkml]   [2002]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH TRIVIAL] linux-2.5.31/drivers/scsi/sg.c
remove 1 verify_area call which is directly followed with a __copy_to_user,
and replace with just a copy_to_user.

--
Silvio
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;
}
\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.041 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site