patch-2.1.125 linux/drivers/scsi/scsicam.c

Next file: linux/drivers/video/amifb.c
Previous file: linux/drivers/scsi/scsi_obsolete.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.124/linux/drivers/scsi/scsicam.c linux/drivers/scsi/scsicam.c
@@ -114,6 +114,8 @@
     	end_head = largest->end_head;
     	end_sector = largest->end_sector & 0x3f;
 
+        if( end_head + 1 == 0 || end_sector == 0 ) return -1;
+
 #ifdef DEBUG
 	printk ("scsicam_bios_param : end at h = %d, c = %d, s = %d\n",
 	    end_head, end_cyl, end_sector);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov