> > I call this function with (curproc, PATH_MAX+1), and everything is fine
> > when I have just a few local variables defined in the caller (it all
> > works on MOD_LOAD only). However, if I have 2 buffers, 4096 bytes each,
> > as local variables and then try to allocate userspace memory the same
> > way, kernel crashes - sometimes inside mmap(), sometimes a bit later.
> >
> > Why could this happen ? Is it related to possible stack overflow ?
>
> Yes. The kernel stack is only two pages; you absolutely must not use
> large local variables in the kernel.
I see. But I still can define them using "static", right ?
Regards,
Eugene
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message