Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932411AbdCINIf (ORCPT ); Thu, 9 Mar 2017 08:08:35 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:50870 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752737AbdCINId (ORCPT ); Thu, 9 Mar 2017 08:08:33 -0500 Date: Thu, 9 Mar 2017 14:08:23 +0100 (CET) From: Thomas Gleixner To: "Paul E. McKenney" cc: linux-kernel@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, fweisbec@gmail.com Subject: Re: RCU used on incoming CPU before rcu_cpu_starting() called In-Reply-To: <20170308221656.GA11949@linux.vnet.ibm.com> Message-ID: References: <20170308221656.GA11949@linux.vnet.ibm.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1189 Lines: 35 On Wed, 8 Mar 2017, Paul E. McKenney wrote: > [ 30.694013] lockdep_rcu_suspicious+0xe7/0x120 > [ 30.694013] get_work_pool+0x82/0x90 > [ 30.694013] __queue_work+0x70/0x5f0 > [ 30.694013] queue_work_on+0x33/0x70 > [ 30.694013] clear_sched_clock_stable+0x33/0x40 > [ 30.694013] early_init_intel+0xe7/0x2f0 > [ 30.694013] init_intel+0x11/0x350 > [ 30.694013] identify_cpu+0x344/0x5a0 > [ 30.694013] identify_secondary_cpu+0x18/0x80 > [ 30.694013] smp_store_cpu_info+0x39/0x40 > [ 30.694013] start_secondary+0x4e/0x100 > [ 30.694013] start_cpu+0x14/0x14 > > Here is the relevant code from x86's smp_callin(): > > /* > * Save our processor parameters. Note: this information > * is needed for clock calibration. > */ > smp_store_cpu_info(cpuid); > > The problem is that smp_store_cpu_info() indirectly invokes > schedule_work(), which wants to use RCU. But RCU isn't informed > of the incoming CPU until the call to notify_cpu_starting(), which > causes lockdep to complain bitterly about the use of RCU by the > premature call to schedule_work(). Right. And that want's to be fixed, not hacked around by silencing RCU. Peter???? Thanks, tglx