On 12 September 2011 06:23, Andreas Longwitz <[email protected]> wrote:

>
> Yes. I found that megarc often wants a buffer of 12868 bytes, but the
> controller sends always 25412 bytes back. Because this seems to be an
> error in megarc I have submitted a patch for the existing PR ports/137938.
>
> Furthermore I saw some sporadic answers of the controller to megarc
> ioctl's with much more data than the buffer size stated by megarc.
> Therefore I still use the maximum size in my updated patch in kern/155658.

Just a comment about that kernel PR:

You're doing a 25k allocation (why not just go with an even 32k?) but
you're not enforcing anywhere that if au_length > your #defined value,
the malloc size is made larger.
I know it's a nitpick, but if it were me doing a change, I'd use
MAX(au_length, MAX_AMR_IOCTL) when doing the malloc.

2c,


Adrian
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[email protected]"

Reply via email to