[SCSI] 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.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
Mark Haverkamp 2005-09-01 08:19:23 -07:00 committed by James Bottomley
parent deb92b7ee9
commit 77d71d222e

View file

@ -972,7 +972,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid)
fibsize = sizeof(struct aac_read64) + fibsize = sizeof(struct aac_read64) +
((le32_to_cpu(readcmd->sg.count) - 1) * ((le32_to_cpu(readcmd->sg.count) - 1) *
sizeof (struct sgentry64)); sizeof (struct sgentry64));
BUG_ON (fibsize > (sizeof(struct hw_fib) - BUG_ON (fibsize > (dev->max_fib_size -
sizeof(struct aac_fibhdr))); sizeof(struct aac_fibhdr)));
/* /*
* Now send the Fib to the adapter * Now send the Fib to the adapter