From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755200AbbJURq1 (ORCPT ); Wed, 21 Oct 2015 13:46:27 -0400 Received: from smtprelay0065.hostedemail.com ([216.40.44.65]:38959 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750698AbbJURqZ (ORCPT ); Wed, 21 Oct 2015 13:46:25 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:2693:2897:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3874:4250:5007:6261:7875:7903:8660:8957:9040:10004:10400:10848:10967:11026:11232:11658:11914:12050:12295:12517:12519:12740:13069:13148:13230:13311:13357:14096:14097:21063:21080:21088,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: floor35_54fc5e22f2007 X-Filterd-Recvd-Size: 2754 Date: Wed, 21 Oct 2015 13:46:22 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: Peter Zijlstra , LKML Subject: Re: [RFC][PATCH] tracing: Have stack tracer force RCU to be watching Message-ID: <20151021134622.0c4b8ceb@gandalf.local.home> In-Reply-To: <20151020195529.423f0dbb@gandalf.local.home> References: <20151020121031.2f9d72c1@gandalf.local.home> <20151020202528.GF5105@linux.vnet.ibm.com> <20151020173228.3e4edda5@gandalf.local.home> <20151020234830.GK5105@linux.vnet.ibm.com> <20151020195529.423f0dbb@gandalf.local.home> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Oct 2015 19:55:29 -0400 Steven Rostedt wrote: > On Tue, 20 Oct 2015 16:48:30 -0700 > "Paul E. McKenney" wrote: > > > On Tue, Oct 20, 2015 at 05:32:28PM -0400, Steven Rostedt wrote: > > > On Tue, 20 Oct 2015 13:25:28 -0700 > > > "Paul E. McKenney" wrote: > > > > > > > On Tue, Oct 20, 2015 at 12:10:31PM -0400, Steven Rostedt wrote: > > > > > > > > > > Paul, > > > > > > > > > > I've spent a couple of days debugging this, and finally found that my > > > > > stack tracer was calling the stack trace code, which calls > > > > > __module_address() which asserts the below. > > > > > > > > > > Is just calling rcu_irq_enter() and rcu_irq_exit() safe to do > > > > > everywhere (with interrupts always disabled)? This patch appears to fix > > > > > the bug. > > > > > > > > Yep! Just don't call it from an NMI handler. And don't call it with > > > > interrupts enabled. The patch looks to have interrupts always disabled, > > > > and the surrounding code doesn't look like NMI-safe code anyway, so > > > > should be OK. > > > > > > > > Thanx, Paul > > > > > > > > > > Hmm, good point about NMI handler. Right now I think the only thing > > > protecting this from getting in the critical section while in NMI is > > > the check that we are using the task struct stack. But that may not be > > > enough in 32 bit. > > > > > > I should probably add a "if (in_nmi()) return" somewhere. > > > > Please! ;-) ;-) ;-) > > > > > > That's a separate fix, as it will break elsewhere than just this. > > As for my patch, Can I have an Acked-by? Ping? -- Steve