public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/9] [PATCH] aacraid: 2.6.13 aacraid bad BUG_ON fix
       [not found] <20050908012842.299637000@localhost.localdomain>
@ 2005-09-08  1:28 ` Chris Wright
  0 siblings, 0 replies; only message in thread
From: Chris Wright @ 2005-09-08  1:28 UTC (permalink / raw)
  To: linux-kernel, stable, Andrew Morton
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Chuck Wolber, torvalds, alan, linux-scsi, Mark Salyzyn,
	Mark Haverkamp, James Bottomley, Chris Wright

[-- Attachment #1: aacraid-bad-BUG_ON-fix.patch --]
[-- Type: text/plain, Size: 1117 bytes --]

-stable review patch.  If anyone has any  objections, please let us know.
------------------

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>
---
 drivers/scsi/aacraid/aachba.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.13.y/drivers/scsi/aacraid/aachba.c
===================================================================
--- linux-2.6.13.y.orig/drivers/scsi/aacraid/aachba.c
+++ linux-2.6.13.y/drivers/scsi/aacraid/aachba.c
@@ -968,7 +968,7 @@ static int aac_read(struct scsi_cmnd * s
 		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

--

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-08  1:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20050908012842.299637000@localhost.localdomain>
2005-09-08  1:28 ` [PATCH 2/9] [PATCH] aacraid: 2.6.13 aacraid bad BUG_ON fix Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox