summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2005-09-01 08:19:23 -0700
committerChris Wright <chrisw@osdl.org>2005-09-09 19:42:50 -0700
commit7a8ad840d817bda420f89963d9650a6f053eeea1 (patch)
tree1bd19be4593742ef365859eae33b3d282a1b6075 /drivers
parent6532533a281e5113d74cb403c256be1c6b446f1a (diff)
[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: 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/aacraid/aachba.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index ccdf440021fb..60ca3b23e4b1 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -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