patch-2.4.22 linux-2.4.22/drivers/block/cciss_scsi.c

Next file: linux-2.4.22/drivers/block/floppy.c
Previous file: linux-2.4.22/drivers/block/cciss.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/drivers/block/cciss_scsi.c linux-2.4.22/drivers/block/cciss_scsi.c
@@ -1182,6 +1182,12 @@
 		{
 		  case 0x01: /* sequential access, (tape) */
 		  case 0x08: /* medium changer */
+			if (ncurrent >= CCISS_MAX_SCSI_DEVS_PER_HBA) {
+				printk(KERN_INFO "cciss%d: %s ignored, "
+					"too many devices.\n", cntl_num,
+					DEVICETYPE(devtype));
+				break;
+			}
 			memcpy(&currentsd[ncurrent].scsi3addr[0],
 				&scsi3addr[0], 8);
 			currentsd[ncurrent].devtype = devtype;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)