This should be if (get_user(addr, stack)) goto prepare_end;
Don't play with access_ok. The real access checking is done inside
the *_user function, access_ok only checks for kernel address
or not (it has very different semantics from the old verify_area !)
> #else /* This results in the death of klogd and others because of unresolved references */
> /* Get the current "address" off the stack */
> addr = *stack;
This will crash the machine when the page is swapped out.
A much simpler alternative: send some signal (e.g. SIGPWR) with send_sig(),
then return with -ERESTARTSYS if you want to be restarted, or some other
return value if you don't. Then the user can dump the backtrace with glibc's
backtrace() function or with gdb. They work with shared libraries too.
-Andi
-- This is like TV. I don't like TV.- 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/