[PATCH] ppc64: User tasks must have a valid thread.regs

Linas Vepstas linas at austin.ibm.com
Tue Sep 21 07:13:33 EST 2004


On Mon, Sep 20, 2004 at 07:40:16PM +1000, Anton Blanchard was heard to remark:
> 
> There have been reports of problems running UP ppc64 kernels where the
> kernel would die in the floating point save/restore code.
> 
> It turns out kernel threads that call exec (and so become user tasks) do
> not have a valid thread.regs.  This means init (pid 1) does not, it also
> means anything called out of exec_usermodehelper does not. Once that
> task has forked (eg init), then the thread.regs in the new task is
> correctly set.
> 
> On UP do lazy save/restore of floating point regs. The SLES9 init is
> doing floating point (the debian version of init appears not to). The
> lack of thread.regs in init combined with the fact that it does floating
> point leads to our lazy FP save/restore code blowing up.
 
OK, but why wasn't SMP affected?  SMP doesn't have lazy save/restore,
it should have hit the null regs pointer "sooner".

--linas



More information about the Linuxppc64-dev mailing list