From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757757AbbCEUcl (ORCPT ); Thu, 5 Mar 2015 15:32:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60479 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753090AbbCEUcf (ORCPT ); Thu, 5 Mar 2015 15:32:35 -0500 Date: Thu, 5 Mar 2015 20:51:27 +0100 From: Oleg Nesterov To: Dave Hansen , Borislav Petkov , Ingo Molnar Cc: Andy Lutomirski , Linus Torvalds , Pekka Riikonen , Rik van Riel , Suresh Siddha , LKML , "Yu, Fenghua" , Quentin Casasnovas Subject: [PATCH 0/1] x86/fpu: math_state_restore() should not blindly disable irqs Message-ID: <20150305195127.GA12657@redhat.com> References: <54F74F59.5070107@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54F74F59.5070107@intel.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/05, Oleg Nesterov wrote: > > And this also means I have another off-topic fix for 4.0/stable, will > send a patch in a minute... I knew about this problem, but I didn't realize that restore_sigcontext() can call a sleeping function after math_state_restore(). So I was going to fix this later, because we need a lot more cleanups in these paths. But it turns out, it is trivial to trigger the "BUG: sleeping function called from invalid context" warning, see the test-case I sent to Dave. To avoid the confusion, this has nothing to do with the problems we discuss in other threads, or with the recent changes in tip/x86/fpu. The patch is horrible, yes. But simple, and math_state_restore/init_fpu are already horrible and need the cleanups. Hopefully I'll send them "soon". Oleg.