Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932114AbbFRKY2 (ORCPT ); Thu, 18 Jun 2015 06:24:28 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:51453 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753318AbbFRKYT (ORCPT ); Thu, 18 Jun 2015 06:24:19 -0400 Date: Thu, 18 Jun 2015 12:24:10 +0200 From: Peter Zijlstra To: Alexander Shishkin Cc: Ingo Molnar , Vince Weaver , linux-kernel@vger.kernel.org, Ingo Molnar , Arnaldo Carvalho de Melo , Stephane Eranian , "Paul E. McKenney" Subject: Re: perf: aux area related crash and warnings Message-ID: <20150618102410.GJ19282@twins.programming.kicks-ass.net> References: <20150615122054.GY3644@twins.programming.kicks-ass.net> <87egld2l2o.fsf@ashishki-desk.ger.corp.intel.com> <87381rg9zx.fsf@ashishki-desk.ger.corp.intel.com> <20150618090954.GB22009@gmail.com> <87bngd2wbg.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87bngd2wbg.fsf@ashishki-desk.ger.corp.intel.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1055 Lines: 30 On Thu, Jun 18, 2015 at 12:35:31PM +0300, Alexander Shishkin wrote: > Ingo Molnar writes: > > > * Alexander Shishkin wrote: > > > >> +void rb_free_aux(struct ring_buffer *rb) > >> +{ > >> + /* > >> + * hold rb::refcount to make sure rb doesn't disappear > >> + * before aux pages are freed > >> + */ > >> + if (WARN_ON_ONCE(!atomic_inc_not_zero(&rb->refcount))) > >> + return; > >> + > >> + if (atomic_dec_and_test(&rb->aux_refcount)) > >> + call_rcu(&rb->rcu_head, rb_free_rcu); > >> + else > >> + ring_buffer_put(rb); /* matches the increment above */ > > > > Is call_rcu() NMI-safe? I don't think so ... > > Actually, we couldn't establish that without Paul's help. I was fairly sure it was not, Paul did confirm last night it is indeed not. -- 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/