Re: bug in fbmem.c,

Richard B. Johnson (root@chaos.analogic.com)
Mon, 28 Jun 1999 17:35:33 -0400 (EDT)


On Mon, 28 Jun 1999, Richard Henderson wrote:

> On Wed, Jun 23, 1999 at 09:35:43AM -0400, Jeff Garzik wrote:
> > + if (copy_size > 0) {
> > + char tmpbuf [copy_size];
>
> You can't do dynamic stack allocation in the kernel.
> You'll have to use kmalloc or get_free_page or something.
>
> r~
>

Are you sure? With some limits-checking it should work, compiler
just subtracts N words from the stack-pointer to make room and
since the compiler 'knows' it did this, it still 'knows' where
everything else is.

The kernel stack is limited is size, but a few hundred bytes for
temporary storage should be available.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.6 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/