[lkml]   [2015]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/1] x86/fpu: math_state_restore() should not blindly disable irqs
On 03/06, Linus Torvalds wrote:
> On Thu, Mar 5, 2015 at 11:58 PM, Ingo Molnar <> wrote:
> >
> > math_state_restore() was historically called with irqs disabled,
> > because that's how the hardware generates the trap, and also because
> > back in the days it was possible for it to be an asynchronous
> > interrupt and interrupt handlers run with irqs off.
> >
> > These days it's always an instruction trap, and furthermore it does
> > inevitably complex things such as memory allocation and signal
> > processing, which is not done with irqs disabled.
> >
> > So keep irqs enabled.
> I agree with the "keep irqs enabled".

Me too, but not for stable. This patch is wrong without other changes.

> IOW, I think the starting point should be something like the attached
> (which doesn't do the WARN_ON_ONCE() - it should be added for
> debugging).

Yes, agreed.

And. Even if we forget about stable, we need some minor changes before
this one. At least we need to add preempt_disable() into kernel_fpu_disable().

So I still think that the horrible hack I sent makes sense for -stable.
Just we need to cleanup (kill) it "immediately".


 \ /
  Last update: 2015-03-06 19:21    [W:0.198 / U:2.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site