]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] aacraid: 2.6.13 aacraid bad BUG_ON fix
authorMark Haverkamp <markh@osdl.org>
Thu, 1 Sep 2005 15:19:23 +0000 (08:19 -0700)
committerChris Wright <chrisw@osdl.org>
Sat, 10 Sep 2005 02:42:50 +0000 (19:42 -0700)
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>
Acked-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/aacraid/aachba.c

index ccdf440021fbe23c8997fc48f4e4928857b906a3..60ca3b23e4b16a95a4572e512eb6ddc8dc605100 100644 (file)
@@ -968,7 +968,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid)
                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