Message ID | 20221024165421.GA1246679@paulmck-ThinkPad-P17-Gen-1 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp621775wru; Mon, 24 Oct 2022 12:43:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4+VRQcI0/lik3dLVJ1HMcbOlFZW1/faeUk+3Bg5b+6uL7KyKFjftgEFzUd/86lZg4dvqQT X-Received: by 2002:a17:907:6e90:b0:7aa:fe50:87fb with SMTP id sh16-20020a1709076e9000b007aafe5087fbmr2273063ejc.97.1666640631999; Mon, 24 Oct 2022 12:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666640631; cv=none; d=google.com; s=arc-20160816; b=eXi+J69xDsV7UeqxsOSiH4JVGsZmmq/ns+diPxnrybj7n8fR97cwHqVy10o62D+lgw PaSbwimsx3+tedr1HYr4dCqo7po57G20BUYDu6a9LSapQgzZF+G1F7kR+YVNhhXZLTwL JRWBBgg9yTWQEfRZeBFJz5LdbvXh1R1RwrUKvnoTE4sPoKa0b8BUr2SmrOFGLOX23LGg 7jYVaBDYsN9a8L6eRlTChOSiYOBEMS4hJPGGD8fmCLqFdNwK22ysmRt0cTFyA/MoX6uD lrJnWW82NR67JB131j6rG0K+b39MG253tKREkn13NOot1RzBz959LEwuXIqO8Pdi99pX 9mWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=XJEEeMi3xp6pxAkLK4x+rdqtwUQorRM0aXpX0YGOQN4=; b=ibmpTfl9DFXmldonFvWV3l6uam6dcwf8vyopae+pd9phPuSXei2ggt+fffz4RyN6eM +Qg2HUIuiuXT2GfFyw6uh4Yis+DaKR1rKYnhi6G+ugNbpnpSc38CbZOozqO4iwa2ZezD WaPS5jYB4izQ36Kjye2hoEwr6HyAlD1lBS8G3ATwRI2gsBVBN88KrysUd9c2E1oKak2m PrGaAgx5tLOcJU/hgSpyXcoVJrZVmNcNlpoTXSwfqV4BMuz4NNxZ1/xbLUIDSbk7qVgz 6e+y3Pqkfak3vh56iFCqcOOiDJ93zbgcKRqv1fUSt4gm5kW1UiACsAt4iy2q8TAECOnQ ky4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BYDTAdWJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lo16-20020a170906fa1000b007aa3373e7fesi514796ejb.520.2022.10.24.12.43.27; Mon, 24 Oct 2022 12:43:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BYDTAdWJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233358AbiJXTf1 (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Mon, 24 Oct 2022 15:35:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233719AbiJXTef (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Oct 2022 15:34:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1A929D532; Mon, 24 Oct 2022 11:05:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 286C7B811C2; Mon, 24 Oct 2022 16:54:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2746C433D7; Mon, 24 Oct 2022 16:54:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666630461; bh=rARJVaCycV3Lh7fwN+ZA5IhIb9PpP1Hw7Aw8GOMPGZs=; h=Date:From:To:Cc:Subject:Reply-To:From; b=BYDTAdWJkpneuy2ZhHojlRm5xdM0V1LGrrfKUfR547bxIihfH3oJQKxlgu1s0WcbV FGkoeku1HnTrpVe0p4rv+wAcdQY5gRpsr9V1saLYKybih+ac+IGF8cPiOWEgds5muQ opiXUooSJ1tMhwZDsr1yIEKwgHMz82e6ve/EEE+E/AEIhV5Ygq2q2QocE2uF3WvIHU kOyeg18FMXZ+WmhmhsHZoO51r/7wrrc7awdIxe3X8SA+EsrTAFbX3uFP4fXdtTRTho s8Tf4VkovjgozLtAUFUNNPgOS4gAoAXwt+jiNpc5T175Rv8UsKzy7oQsDKxR+tYl8C RDCjT+cVw1jyg== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 7AE5F5C05FB; Mon, 24 Oct 2022 09:54:21 -0700 (PDT) Date: Mon, 24 Oct 2022 09:54:21 -0700 From: "Paul E. McKenney" <paulmck@kernel.org> To: torvalds@linux-foundation.org Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, rcu@vger.kernel.org, kernel-team@fb.com, rostedt@goodmis.org Subject: [GIT PULL] Keep synchronize_rcu() from enabling irqs in early boot Message-ID: <20221024165421.GA1246679@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS,URG_BIZ autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747599367364178053?= X-GMAIL-MSGID: =?utf-8?q?1747599367364178053?= |
Series |
[GIT,PULL] Keep synchronize_rcu() from enabling irqs in early boot
|
|
Pull-request
git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git tags/rcu-urgent.2022.10.20aMessage
Paul E. McKenney
Oct. 24, 2022, 4:54 p.m. UTC
Hello, Linus, This pull request fixes a merge-window regression noted by Steve Rostedt. The following changes since commit 9abf2313adc1ca1b6180c508c25f22f9395cc780: Linux 6.1-rc1 (2022-10-16 15:36:24 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git tags/rcu-urgent.2022.10.20a for you to fetch changes up to 31d8aaa87fcef1be5932f3813ea369e21bd3b11d: rcu: Keep synchronize_rcu() from enabling irqs in early boot (2022-10-20 15:34:49 -0700) ---------------------------------------------------------------- Urgent RCU pull request for v6.1 This pull request contains a commit that fixes bf95b2bc3e42 ("rcu: Switch polled grace-period APIs to ->gp_seq_polled"), which could incorrectly leave interrupts enabled after an early-boot call to synchronize_rcu(). Such synchronize_rcu() calls must acquire leaf rcu_node locks in order to properly interact with polled grace periods, but the code did not take into account the possibility of synchronize_rcu() being invoked from the portion of the boot sequence during which interrupts are disabled. This commit therefore switches the lock acquisition and release from irq to irqsave/irqrestore. ---------------------------------------------------------------- Paul E. McKenney (1): rcu: Keep synchronize_rcu() from enabling irqs in early boot kernel/rcu/tree.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
Comments
On Mon, Oct 24, 2022 at 9:54 AM Paul E. McKenney <paulmck@kernel.org> wrote: > > This pull request contains a commit that fixes bf95b2bc3e42 ("rcu: Switch > polled grace-period APIs to ->gp_seq_polled"), which could incorrectly > leave interrupts enabled after an early-boot call to synchronize_rcu(). Minor stylistic nit-pick - please try to keep the commit tags together, ie the "Fixes:" tags goes with Reported-by: tags and sign-offs etc.. Linus
On Mon, Oct 24, 2022 at 12:40:01PM -0700, Linus Torvalds wrote: > On Mon, Oct 24, 2022 at 9:54 AM Paul E. McKenney <paulmck@kernel.org> wrote: > > > > This pull request contains a commit that fixes bf95b2bc3e42 ("rcu: Switch > > polled grace-period APIs to ->gp_seq_polled"), which could incorrectly > > leave interrupts enabled after an early-boot call to synchronize_rcu(). > > Minor stylistic nit-pick - please try to keep the commit tags > together, ie the "Fixes:" tags goes with Reported-by: tags and > sign-offs etc.. Please accept my apologies for my confusion! Please see below for a pull request for a better-formatted commit. Thanx, Paul ------------------------------------------------------------------------ This pull request fixes a merge-window regression noted by Steve Rostedt. The following changes since commit 9abf2313adc1ca1b6180c508c25f22f9395cc780: Linux 6.1-rc1 (2022-10-16 15:36:24 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git tags/rcu-urgent.2022.10.24a for you to fetch changes up to c216e5557395092a1a30ddb2be8ab924b0364585: rcu: Keep synchronize_rcu() from enabling irqs in early boot (2022-10-24 12:55:37 -0700) ---------------------------------------------------------------- Urgent RCU pull request for v6.1 This pull request contains a commit that fixes bf95b2bc3e42 ("rcu: Switch polled grace-period APIs to ->gp_seq_polled"), which could incorrectly leave interrupts enabled after an early-boot call to synchronize_rcu(). Such synchronize_rcu() calls must acquire leaf rcu_node locks in order to properly interact with polled grace periods, but the code did not take into account the possibility of synchronize_rcu() being invoked from the portion of the boot sequence during which interrupts are disabled. This commit therefore switches the lock acquisition and release from irq to irqsave/irqrestore. ---------------------------------------------------------------- Paul E. McKenney (1): rcu: Keep synchronize_rcu() from enabling irqs in early boot kernel/rcu/tree.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
On Mon, Oct 24, 2022 at 1:04 PM Paul E. McKenney <paulmck@kernel.org> wrote: > > Please accept my apologies for my confusion! > > Please see below for a pull request for a better-formatted commit. Oh, it was such a small nit that I already pulled your tree - my note was really just a "not a big deal, but in the future it would be nice if.." Linus
The pull request you sent on Mon, 24 Oct 2022 09:54:21 -0700:
> git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git tags/rcu-urgent.2022.10.20a
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f6602a97a11a3ddc077889fec2c026113c33c670
Thank you!
On Mon, Oct 24, 2022 at 01:06:12PM -0700, Linus Torvalds wrote: > On Mon, Oct 24, 2022 at 1:04 PM Paul E. McKenney <paulmck@kernel.org> wrote: > > > > Please accept my apologies for my confusion! > > > > Please see below for a pull request for a better-formatted commit. > > Oh, it was such a small nit that I already pulled your tree - my note > was really just a "not a big deal, but in the future it would be nice > if.." Thank you, and at least I got practice for the future. ;-) Thanx, Paul