> You could perhaps use C99 variable length arrays to avoid the stack
It generates frame pointers, but that's not that bad. I'm not
aware of any other bad side effects. Ok the compiler will limit
your goto usage, but that's more a good thing.
But since you always have to strictly limit the array in kernel code anyways
you could as well just allocate the fixed limit.
-Andi
-