lkml.org 
[lkml]   [2012]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: ptrace && fpu_lazy_restore
On Sun, Apr 15, 2012 at 4:42 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> That one is done by design. That fpu_counter=0 in copy_thread() is
> there explicitly to avoid the problem. Although it's possible that we
> should reset last_cpu instead. However, that line was actually added
> before the lazy thing - see commit cea20ca3f318.

Put another way: I do think it would be a good idea to do the "reset
last_cpu" in copy_thread() too. It doesn't really cost us anything,
and it's cleaner to always just make sure that last_cpu is "valid"
(even if the fpu_owner_task is *also* used to invalidate it, and even
if we never use the lazy restore if fpu_counter is zero and thus
fpu.preload isn't set).

Linus


\
 
 \ /
  Last update: 2012-04-16 01:49    [W:0.046 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site