Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4691631pxu; Tue, 13 Oct 2020 05:04:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJOB1A7iYV9TsJKTgVOb8E2eUNg/WP1zgu5ls8sNimdz+pLGqhrvgdOJUSIn0znwp5Ho+G X-Received: by 2002:a17:907:417e:: with SMTP id oe22mr15596674ejb.10.1602590675373; Tue, 13 Oct 2020 05:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602590675; cv=none; d=google.com; s=arc-20160816; b=LFAMsOhlBt3FqEuuUZDCIox1u0+DR4N/wwEsRQtpS+WHD6h471YESYrdW3hNatVEbr eZIDfUOk/TdEFmxMAQcGmAShoJE7DcHgHxu72erI/m2bNOiGp65fKkVhRpfmJylPI6FJ dX8/CktjRaBwqQuc4W5VeRA9OeMxjJVwGAYAOdri2paejMACYyz/7NVTUt9I7hsyFQ2+ j9VhseCGAolxI7GhKnF4sP71R1Pt/6DVcxpKXwrfrs78n/cf03i2Qn3e6SqOLVhIAhzl ZLwAhw4RJGNHwsrJFivSTg6lHxg74kQkq8oG4weNm1DIjzyH2wLe4ZJ6iXOPqZSfcc7p dXBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=f6v7bo6Fu/9tm/yz2e4NZSbO5J9cvh1XjyZdnBx9s/8=; b=lathAebZi9jbloEfQgjgpkEsWDwCSpEqo3S02jjhxKqccEwHGPgKv1cAKxFR+6w0Oc YFtI/tDFuY3TbYSaAt1gKShNN6Fdr5/RQn70pEjapBukaUlPaRB2y0t1b/SJcwn5YKV7 dIYPg9E6j9+7GELperCZENulI+OokV5xz/AR7gVVtATgfV01SvXYUnUTg1XI4IvX+CC3 EV6v65JAZB9AjC2gKSmD1LAkffdue+qgWRupmYaUkNcxYy5FPN6d+PJCM2LgoYzZaEoX Q854bTqFgRC96iJyyWYHLHVmP+3ti3wyypWhQ3s6BDnyMJpV49YIRAgouC85QH+7C6tP DDUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=TC9l4f3K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si7007108edq.345.2020.10.13.05.04.11; Tue, 13 Oct 2020 05:04:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=TC9l4f3K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388630AbgJMKeh (ORCPT + 99 others); Tue, 13 Oct 2020 06:34:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388136AbgJMKeg (ORCPT ); Tue, 13 Oct 2020 06:34:36 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 972CAC0613D0; Tue, 13 Oct 2020 03:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=f6v7bo6Fu/9tm/yz2e4NZSbO5J9cvh1XjyZdnBx9s/8=; b=TC9l4f3KVyc/dPz6Wnb3hCXWQl T1TlVcnSiIBy0avI94VPkr3yD9hjS2stmauhed17c7FTYnlR+TjsVhH6NqT5OC/QcEXNUy7QV+r0b kFHnQ0Ab9TbUTOsS2bCMdupGIXIQ+UUBmZJMAKr+w2NA+VrEW2bOtXZBWXTAHgVgTe/PQVjYoLEPO EBxTk4+ZBw5OqXYWsZEDfz0JpfIcDa6DCILhfFlerF4Kmd58KMXZZZ2aT/gQx4a/mUk0tW0Bq6o4j 7HH2vvnfMNmja0s11tKqTrSFacm4ToLn+YMQBeQ4LvNQLS2Zuss6//vyCmt1nVZnFPJRGBrWiSlxI AXoMzyDg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSHdA-0006sS-87; Tue, 13 Oct 2020 10:34:08 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id CE9D2300DB4; Tue, 13 Oct 2020 12:34:06 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id BB6A82C1258F1; Tue, 13 Oct 2020 12:34:06 +0200 (CEST) Date: Tue, 13 Oct 2020 12:34:06 +0200 From: Peter Zijlstra To: "Paul E. McKenney" Cc: Boqun Feng , Qian Cai , Steven Rostedt , Ingo Molnar , x86 , linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, Linux Next Mailing List , Stephen Rothwell Subject: Re: [tip: locking/core] lockdep: Fix lockdep recursion Message-ID: <20201013103406.GY2628@hirez.programming.kicks-ass.net> References: <160223032121.7002.1269740091547117869.tip-bot2@tip-bot2> <20201012031110.GA39540@debian-boqun.qqnc3lrjykvubdpftowmye0fmh.lx.internal.cloudapp.net> <20201012212812.GH3249@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201012212812.GH3249@paulmck-ThinkPad-P72> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 12, 2020 at 02:28:12PM -0700, Paul E. McKenney wrote: > It is certainly an accident waiting to happen. Would something like > the following make sense? Sadly no. > ------------------------------------------------------------------------ > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index bfd38f2..52a63bc 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -4067,6 +4067,7 @@ void rcu_cpu_starting(unsigned int cpu) > > rnp = rdp->mynode; > mask = rdp->grpmask; > + lockdep_off(); > raw_spin_lock_irqsave_rcu_node(rnp, flags); > WRITE_ONCE(rnp->qsmaskinitnext, rnp->qsmaskinitnext | mask); > newcpu = !(rnp->expmaskinitnext & mask); > @@ -4086,6 +4087,7 @@ void rcu_cpu_starting(unsigned int cpu) > } else { > raw_spin_unlock_irqrestore_rcu_node(rnp, flags); > } > + lockdep_on(); > smp_mb(); /* Ensure RCU read-side usage follows above initialization. */ > } This will just shut it up, but will not fix the actual problem of that spin-lock ending up in trace_lock_acquire() which relies on RCU which isn't looking. What we need here is to supress tracing not lockdep. Let me consider.