patch-2.3.51 linux/drivers/scsi/scsi_dma.c

Next file: linux/drivers/sound/Config.in
Previous file: linux/drivers/scsi/aic7xxx.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.50/linux/drivers/scsi/scsi_dma.c linux/drivers/scsi/scsi_dma.c
@@ -147,7 +147,7 @@
 			nbits = len >> 9;
 			mask = (1 << nbits) - 1;
 
-			if ((mask << sector) >= (1 << SECTORS_PER_PAGE))
+			if (sector + nbits > SECTORS_PER_PAGE)
 				panic("scsi_free:Bad memory alignment");
 
 			if ((dma_malloc_freelist[page] &

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