mbox series

[GIT,PULL] Keep synchronize_rcu() from enabling irqs in early boot

Message ID 20221024165421.GA1246679@paulmck-ThinkPad-P17-Gen-1 (mailing list archive)
State Accepted
Commit 6e442d06621f2af87fc0bf352976694db547c780
Headers show
Series [GIT,PULL] Keep synchronize_rcu() from enabling irqs in early boot | expand

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git tags/rcu-urgent.2022.10.20a

Message

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

Linus Torvalds Oct. 24, 2022, 7:40 p.m. UTC | #1
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
Paul E. McKenney Oct. 24, 2022, 8:04 p.m. UTC | #2
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(-)
Linus Torvalds Oct. 24, 2022, 8:06 p.m. UTC | #3
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
pr-tracker-bot@kernel.org Oct. 24, 2022, 8:06 p.m. UTC | #4
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!
Paul E. McKenney Oct. 24, 2022, 8:21 p.m. UTC | #5
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