Skip to contentSkip to conversation

aacraid: 2.6.13 aacraid bad BUG_ON fix

PATCH New Mark Haverkamp 1 participant 1 message Sep 1, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aacraid: 2.6.13 aacraid bad BUG_ON fix

This was noticed by Doug Bazamic and the fix found by Mark Salyzyn at Adaptec.

There was an error in the BUG_ON() statement that validated the calculated fib size which can cause the driver to panic.

drivers/scsi/aacraid/aachba.c +1 -1
@@ -968,7 +968,7 @@
 		fibsize = sizeof(struct aac_read64) + 
 			((le32_to_cpu(readcmd->sg.count) - 1) * 
 			 sizeof (struct sgentry64));
-		BUG_ON (fibsize > (sizeof(struct hw_fib) - 
+		BUG_ON (fibsize > (dev->max_fib_size - 
 					sizeof(struct aac_fibhdr)));
 		/*
 		 *	Now send the Fib to the adapter
Signature · 1 line
Mark Haverkamp <[email protected]>