[Top] [All Lists]

Re: [PATCH 2.5] clear USEDFPU in copy_thread

To: Vivien Chappelier <>
Subject: Re: [PATCH 2.5] clear USEDFPU in copy_thread
From: Jun Sun <>
Date: Fri, 7 Feb 2003 10:46:21 -0800
Cc: Ralf Baechle <>,,
In-reply-to: <>; from on Thu, Feb 06, 2003 at 04:43:42PM -0800
Original-recipient: rfc822;
References: <Pine.LNX.4.21.0302042349200.31806-100000@melkor> <>
User-agent: Mutt/1.2.5i
On Thu, Feb 06, 2003 at 04:43:42PM -0800, Jun Sun wrote:
> You should *not* clear USEDFPU in copy_thread().  Imagine
> you assign a floating point variable f=0.3, then do fork()
> and then in the child process, alas, f is undefined (zero
> most likely).
> If you really want to do it, it should be in start_thread().

This is plain stupid comment!  I was thinking about task->used_math
flag.  Please igore it.  
> I am still curious whether this is a bug in i386 as well or they do
> clear the flag in some non-obvious way.  Note that the unlazy_fpu()
> in copy_thread won't do it.  It only clears the current process's
> USEDFPU flag, while the child process's flag is set way back in
> copy_flags() calls inside do_fork().

But this comment still makes sense... 


<Prev in Thread] Current Thread [Next in Thread>