patch-2.4.23 linux-2.4.23/drivers/scsi/sg.c
Next file: linux-2.4.23/drivers/scsi/sun3_scsi.c
Previous file: linux-2.4.23/drivers/scsi/scsi_scan.c
Back to the patch index
Back to the overall index
- Lines: 9
- Date:
2003-11-28 10:26:20.000000000 -0800
- Orig file:
linux-2.4.22/drivers/scsi/sg.c
- Orig date:
2003-06-13 07:51:36.000000000 -0700
diff -urN linux-2.4.22/drivers/scsi/sg.c linux-2.4.23/drivers/scsi/sg.c
@@ -871,6 +871,8 @@
case SG_SET_RESERVED_SIZE:
result = get_user(val, (int *)arg);
if (result) return result;
+ if (val < 0)
+ return -EINVAL;
if (val != sfp->reserve.bufflen) {
if (sg_res_in_use(sfp) || sfp->mmap_called)
return -EBUSY;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)