From: Dave Hansen Subject: Re: [PATCH] x86/fpu: Disable BH while while loading FPU registers in __fpu__restore_sig() Date: Mon, 12 Nov 2018 09:48:08 -0800 Message-ID: <433cec57-57a9-afff-22f3-68308eda682b@intel.com> References: <20181107194858.9380-1-bigeasy@linutronix.de> <20181107194858.9380-3-bigeasy@linutronix.de> <20181108145721.GC7543@zn.tnic> <20181109173521.2m6iijp5wkncgi77@linutronix.de> <20181109185202.GF21243@zn.tnic> <20181109232521.l2ll2n3coxygkxv4@linutronix.de> <20181112155643.vclej44qzg3pmbow@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Andy Lutomirski , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , kvm@vger.kernel.org, "Jason A. Donenfeld" , Rik van Riel , Dave Hansen To: Sebastian Andrzej Siewior , Borislav Petkov , x86@kernel.org Return-path: In-Reply-To: <20181112155643.vclej44qzg3pmbow@linutronix.de> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 11/12/18 7:56 AM, Sebastian Andrzej Siewior wrote: > Use local_bh_disable() around the restore sequence to avoid the race. BH > needs to be disabled because BH is allowed to run (even with preemption > disabled) and might invoke kernel_fpu_begin(). FWIW, that would make nice comment fodder for the local_bh_disable(). I'd much rather run into it there than in a changelog.