Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753126AbaBBBG5 (ORCPT ); Sat, 1 Feb 2014 20:06:57 -0500 Received: from mail-la0-f53.google.com ([209.85.215.53]:52155 "EHLO mail-la0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbaBBBGz (ORCPT ); Sat, 1 Feb 2014 20:06:55 -0500 MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 1 Feb 2014 17:06:53 -0800 Message-ID: Subject: Re: [PATCH] Make math_state_restore() save and restore the interrupt flag From: Suresh Siddha To: Linus Torvalds Cc: Nate Eldredge , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "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 11:27 AM, Linus Torvalds wrote: > That said, regardless of the allocation issue, I do think that it's > stupid for kernel_fpu_{begin,end} to save the math state if > "used_math" was not set. So I do think__kernel_fpu_end() as-s is > buggy and stupid. For eager_fpu case, assumption was every task should always have 'used_math' set. But i think there is a race, where we drop the fpu explicitly by doing drop_fpu() and meanwhile if we get an interrupt etc that ends up using fpu? so I will Ack for option "b", as option "a" breaks the features which don't take into account cr0.TS. Meanwhile I have the patch removing the delayed dynamic allocation for non-eager fpu. will post it after some testing. thanks, suresh -- 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/