Commit 7a8ad840 authored by Mark Haverkamp's avatar Mark Haverkamp Committed by Chris Wright

[PATCH] 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.
Signed-off-by: default avatarMark Haverkamp <markh@osdl.org>
Acked-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6532533a
...@@ -968,7 +968,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) ...@@ -968,7 +968,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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment