remove 1 verify_area call which is directly followed with a __copy_to_user,
and replace with just a copy_to_user.
-- Silvio--BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch.2.5.31.sg"
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; }
--BXVAT5kNtrzKuDFl-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/