Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3320383pxv; Sun, 18 Jul 2021 18:53:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY56yYqeTKsYZtyvBxO/cIDc5gVeDbDMAYI3w4oeusGSkTI61p643mfZCEGyLESk0Oc4Rb X-Received: by 2002:a05:6e02:13d3:: with SMTP id v19mr6545193ilj.167.1626659637662; Sun, 18 Jul 2021 18:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626659637; cv=none; d=google.com; s=arc-20160816; b=jh3M+Zbr2bIKzFfwMKeel6BrIZehCvfZzr3YOEv95hOVuhMeWM0+1AZPWPQ7/kivkI kU8PJDx3oylILx/GnDQ9WB1P52rlPbRtlh7Ricv35wMHhl7cAQ9I/t713qL2D2vNGcUJ utzwUvFzipF/FZBZVys60M1f0WNuXyxyxW30dXDt/mkVnzvzZmMziWo8IOBe8Jj7pVkh sR46GIQlXl4IoaWLDnYk1q2At2Xh10oSADt/d/B9hVwhST/Q3j1JVIzlmbRZNRb4Wcdp Q9TaFpRtB2m6Zg0uQ/ZW7wyMOiB470FOmctgT3VN0VOb/4HrGbAywtcpFfozAIcuXVfe ssHA== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=HRHzf5V1O1QCvl89OIEyw2pAOwqtd9tTPMvycISTL+I=; b=W2LJWdKwQxcnrXL5NCJ8nKKNY1u4tbYSF5VNX3yCkjl1uvEjY5vS1OblFMT0jtfIGE cUBT1YQn4EP38MiZ6p7acPb1E+z6MXaG50VLnCO3qXxJqHRcIw+EXJV8qO2C7JBo+Sm1 Xyf4eTN8QL7jxYFxe80UiGi7Nt4qZyrtEBJXh8IXT6uqfVBLV6Vb0AcRpEFTNakjeZTO oxAw3PE5PpdnlpyOOL/VWL+qs85oqtgLAbrdJlw1SaiGVDeAK/zgLLtwIojYNcQbO1xv eE9Q0pWh63kM0finkblK/DwAXl5cM4YyjLrsagIbAL1LPHQB4+HN8gFyO2efQJMq1iGw r76w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lzfp1xKh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q21si9265290jat.69.2021.07.18.18.53.45; Sun, 18 Jul 2021 18:53:57 -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=@kernel.org header.s=k20201202 header.b=lzfp1xKh; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233964AbhGSB4P (ORCPT + 99 others); Sun, 18 Jul 2021 21:56:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:52434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233713AbhGSB4M (ORCPT ); Sun, 18 Jul 2021 21:56:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A4A7A6101E; Mon, 19 Jul 2021 01:53:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626659593; bh=GYBuop9qpLcVug/DJr2XcYTGfTFztJPHFoMtB+R8IyM=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=lzfp1xKh+lqP0S4ywihx2NGS/TyZK1whI0V1SnVScfApXQlWsZgweLgd1sRXViMBd K4L5Cn8+snuCKroNpstGiKYHWW4XTGkN6wgukG6empMjzcMDJfgDmP87yHOpLB5eyR og5qz7wRaeCOj1WbKZQMa1W0+H8JvGYATouQgHXmQ9MypfnCRx36qgZZKehOZbySLE 8mWCEZVy1RP0ZFif7V+rkXO4zNdGLIPWzP1qqQtbzUBHBvKy/5U/oIoap33rix7ufd 7W+0Xxhyhcr+pfMyv9sXHh54NIJmvc7I5S/bMazWBfuV4iwDCCyQiVk05tK2LER4Dv xI8qrAL//1GCA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 74CA95C2BEE; Sun, 18 Jul 2021 18:53:13 -0700 (PDT) Date: Sun, 18 Jul 2021 18:53:13 -0700 From: "Paul E. McKenney" To: Matthew Wilcox Cc: Oleksandr Natalenko , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Chris Clayton , Chris Rankin , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , rcu@vger.kernel.org, Andrew Morton , linux-mm@kvack.org Subject: Re: linux-5.13.2: warning from kernel/rcu/tree_plugin.h:359 Message-ID: <20210719015313.GS4397@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org References: <2245518.LNIG0phfVR@natalenko.name> <6698965.kvI7vG0SvZ@natalenko.name> <20210718215914.GQ4397@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 18, 2021 at 11:51:36PM +0100, Matthew Wilcox wrote: > On Sun, Jul 18, 2021 at 02:59:14PM -0700, Paul E. McKenney wrote: > > > > https://lore.kernel.org/lkml/CAK2bqVK0Q9YcpakE7_Rc6nr-E4e2GnMOgi5jJj=_Eh_1k > > > > EHLHA@mail.gmail.com/ > > > > But this one does show this warning in v5.12.17: > > > > WARN_ON_ONCE(!preempt && rcu_preempt_depth() > 0); > > > > This is in rcu_note_context_switch(), and could be caused by something > > like a schedule() within an RCU read-side critical section. This would > > of course be RCU-usage bugs, given that you are not permitted to block > > within an RCU read-side critical section. > > > > I suggest checking the functions in the stack trace to see where the > > rcu_read_lock() is hiding. CONFIG_PROVE_LOCKING might also be helpful. > > I'm not sure I see it in this stack trace. > > Is it possible that there's something taking the rcu read lock in an > interrupt handler, then returning from the interrupt handler without > releasing the rcu lock? Do we have debugging that would fire if > somebody did this? Lockdep should complain, but in the absence of lockdep I don't know that anything would gripe in this situation. Also, this is a preemptible kernel, so it is possible to trace __rcu_read_lock(), if that helps. Thanx, Paul