Re: top stack (l)users for 2.5.69

Linus Torvalds
2003-05-07T18:23:56Z

In article <Pine.LNX.4.53.0305070933450.11740@chaos>,
Richard B. Johnson <root@chaos.analogic.com> wrote:
>
>You know (I hope) that allocating stuff on the stack is not
>"bad".

Allocating stuff on the stack _is_ bad if you allocate more than a few
hundred bytes. That's _especially_ true deep down in the call-sequence,
ie in device drivers, low-level filesystems etc.

The kernel stack is a very limited resource, with no protection from
overflow. Being lazy and using automatic variables is a BAD BAD thing,
even if it's syntactically easy and generates good code.

Linus