Re: Suggestion for fixing the variable length array used in the kernel.

Dan Carpenter
2013-03-09T05:39:16Z

On Fri, Mar 08, 2013 at 04:29:22PM -0800, Andrew Morton wrote:
> On Wed, 6 Mar 2013 20:46:35 -0800 Christopher Li <sparse@chrisli.org> wrote:
>
> > Hi,
> >
> > I am looking at the current sparse warning on the kernel source.
> > One category of those warning are produce by the variable length array.
> > We all know that the kernel stack has a limit so we don't want to allocate
> > too much stack to the variable size array.
> >
> > Is there a recommended way to fix those warnings? Is it worth while to
> > fix it at all? I am looking forward to some kind of guideline how to handle
> > this.
>
> Roughly how many instances of this are there kernel-wide?
>

Around 150 on x86 allmodconfig. They are pretty well audited.

regards,
dan carpenter