From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751563Ab2H2Eos (ORCPT ); Wed, 29 Aug 2012 00:44:48 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:47953 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750914Ab2H2Eoq (ORCPT ); Wed, 29 Aug 2012 00:44:46 -0400 Date: Wed, 29 Aug 2012 07:42:55 +0300 From: Sergey Senozhatsky To: Borislav Petkov , Sergey Senozhatsky , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Steven Rostedt , Srikar Dronamraju , Peter Zijlstra , "Paul E. McKenney" , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] x86: use new exception_enter()/exception_exit() API in do_device_not_available() Message-ID: <20120829044255.GA3147@swordfish> References: <20120828210047.GA22279@swordfish> <20120828221111.GC9297@liondog.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120828221111.GC9297@liondog.tnic> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (08/29/12 00:11), Borislav Petkov wrote: > Date: Wed, 29 Aug 2012 00:11:13 +0200 > From: Borislav Petkov > To: Sergey Senozhatsky > Cc: Thomas Gleixner , Ingo Molnar , > "H. Peter Anvin" , x86@kernel.org, Steven Rostedt > , Srikar Dronamraju , > Peter Zijlstra , "Paul E. McKenney" > , linux-kernel@vger.kernel.org > Subject: Re: [RFC PATCH] x86: use new exception_enter()/exception_exit() > API in do_device_not_available() > User-Agent: Mutt/1.5.21 (2010-09-15) > > On Wed, Aug 29, 2012 at 12:00:47AM +0300, Sergey Senozhatsky wrote: > > x86: use new exception_enter()/exception_exit() API in do_device_not_available() > > > > RCU can be in extended quiescent state when do_device_not_available() called. > > > > [ 676.400274] RCU used illegally from idle CPU! > > [ 676.400274] rcu_scheduler_active = 1, debug_locks = 0 > > [ 676.400278] RCU used illegally from extended quiescent state! > > [ 676.400282] 2 locks held by sed/9468: > > [ 676.400285] #0: (&rq->lock){-.-.-.}, at: [] __schedule+0x1c0/0x992 > > [ 676.400304] #1: (rcu_read_lock){.+.+..}, at: [] cpuacct_charge+0x27/0x1e0 > > [ 676.400321] > > [ 676.400329] Call Trace: > > [ 676.400340] [] lockdep_rcu_suspicious+0x109/0x112 > > [ 676.400347] [] cpuacct_charge+0x9e/0x1e0 > > [ 676.400353] [] ? cpuacct_charge+0x27/0x1e0 > > [ 676.400359] [] ? __schedule+0x1c0/0x992 > > [ 676.400366] [] update_curr+0x159/0x200 > > [ 676.400375] [] ? init_fpu+0x4e/0x8f > > [ 676.400382] [] put_prev_task_fair+0x2a/0xac > > [ 676.400388] [] __schedule+0x398/0x992 > > [ 676.400397] [] ? rcu_irq_exit+0x83/0x99 > > [ 676.400404] [] ? retint_restore_args+0x13/0x13 > > [ 676.400411] [] ? lock_is_held+0x2d/0xa5 > > [ 676.400414] [] ? init_fpu+0x4e/0x8f > > [ 676.400417] [] __cond_resched+0x28/0x34 > > [ 676.400420] [] _cond_resched+0x2e/0x35 > > [ 676.400425] [] kmem_cache_alloc+0x4c/0x1c5 > > [ 676.400430] [] ? math_state_restore+0x1f/0xdc > > [ 676.400433] [] init_fpu+0x4e/0x8f > > [ 676.400437] [] math_state_restore+0x2e/0xdc > > [ 676.400440] [] do_device_not_available+0xe/0x10 > > [ 676.400445] [] device_not_available+0x1b/0x20 > > > > > > Signed-off-by: Sergey Senozhatsky > > > > --- > > > > arch/x86/kernel/traps.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c > > index ab82cbd..dff3e72 100644 > > --- a/arch/x86/kernel/traps.c > > +++ b/arch/x86/kernel/traps.c > > @@ -654,7 +654,9 @@ do_device_not_available(struct pt_regs *regs, long error_code) > > return; > > } > > #endif > > + exception_enter(regs); > > math_state_restore(); /* interrupts still off */ > > + exception_enter(regs); > > Shouldn't that be exception_exit actually? > OH! NO WAY I did that mistake! That was some last minute in-text-editor changes and somehow I screwed this up. Will re-send in a second. Sorry, and thank you. -ss