Libor Vanek <libor@xxxxxxxx> writes:OK - what's correct implementation? Do a "char * tmp_path" and kmalloc it?
...PATH_MAX is 4096. The i386 stack is only 6k. You already overflowed it.
asmlinkage long sys_open(const char __user * filename, int flags, int mode)
{
char * tmp;
int fd, error;
char tmp_path[PATH_MAX],tmp2_path[PATH_MAX];
You're lucky if your machine only panics, much worse things can happen
with kernel stack overflows.