[lkml]   [2003]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] megaraid driver fix for 2.5.70
On Tue, 2003-06-03 at 10:29, Mark Haverkamp wrote:
> A recent change to the megaraid driver to fix some memset calls resulted
> in overflowing the arrays being cleared and causing a system panic.
> This patch fixes the problem by making sure that the arrays being
> cleared are dimensioned to the correct size. The patch has been tested
> on osdl's stp machines that have megaraid controllers.

This patch doesn't quite look like a fix to me: The megaraid mailboxes
are always >16 bytes *but* none of the setting commands is supposed to
touch any of the status parts (which begin at byte 15), so I don't see
how your patch would prevent a panic.

It also looks like the first fifteen (not sixteen) bytes are user data
and the remaining 51 are for data from the card.

It thus looks like this memcpy in both issue_scb() and issue_scb_block()
may be wrong

memcpy((char *)mbox, (char *)scb->raw_mbox, 16);

because it's overwriting the mbox->busy return.

Logically, it looks like the mbox_t should be split up into an mbox_out
(which is what all the routines want to set values in) and an mbox_in
which is where the status is returned.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:36    [W:0.035 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site