Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751179AbaBBBia (ORCPT ); Sat, 1 Feb 2014 20:38:30 -0500 Received: from mail-vb0-f41.google.com ([209.85.212.41]:54064 "EHLO mail-vb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbaBBBi2 (ORCPT ); Sat, 1 Feb 2014 20:38:28 -0500 MIME-Version: 1.0 In-Reply-To: References: <52ED9EA9.7080009@zytor.com> Date: Sat, 1 Feb 2014 17:38:27 -0800 X-Google-Sender-Auth: gGmB7tC7GKfzd_-W3lmdKLDOcjA Message-ID: Subject: Re: [PATCH] Make math_state_restore() save and restore the interrupt flag From: Linus Torvalds To: Suresh Siddha Cc: "H. Peter Anvin" , Nate Eldredge , Thomas Gleixner , Ingo Molnar , "the arch/x86 maintainers" , stable , Linux Kernel Mailing List , Maarten Baert , Jan Kara , George Spelvin , Pekka Riikonen Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 1, 2014 at 5:35 PM, Suresh Siddha wrote: > On Sat, Feb 1, 2014 at 5:26 PM, H. Peter Anvin wrote: >> Even "b" does that, no? > > oh right. It needs an else. only for non-eager fpu case we should do stts() It definitely does not want an else, I think. If tsk_used_math() is false, or if the FPU restore failed, we *definitely* need that stts(). Otherwise we'd return to user mode with random contents in the FP state, and let user mode muck around with it. No? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/