From: Jeff D. <jd...@ad...> - 2007-04-13 17:59:55
|
On Fri, Apr 13, 2007 at 09:31:16AM -0700, Haifeng He wrote: > Yes. So that is the problem. Is there any other place which may cause > similar problems? If you're going to be sprinking code randomly around UML, you need to be cognizant of what stack the surrounding code runs on. You hit code which is setting up a new process, and is running on a non-kernel stack in the context of the new process. init_thread_cb runs on the initial UML process stack. The stubs run on a stack in the upper two pages of the process address space. These bits of code can't run kernel code, since they aren't on a kernel stack, and current() et al won't be valid. Pretty much everything else is on a kernel stack, and what you're doing should be fine. Jeff -- Work email - jdike at linux dot intel dot com |