Linux real-time development
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Clark Williams <clrkwllms@kernel.org>,
	linux-rt-devel@lists.linux.dev
Subject: Re: Possible enhancement to RCU CPU stall warning messages
Date: Fri, 16 Oct 2026 12:17:53 -0400	[thread overview]
Message-ID: <20261016121753.0da4e4e1@gandalf.local.home> (raw)
In-Reply-To: <7aac27b4-b323-436b-95a4-25c676f6f934@paulmck-laptop>

On Fri, 16 Oct 2026 09:00:31 -0700
"Paul E. McKenney" <paulmck@kernel.org> wrote:

> > > @@ -372,17 +381,24 @@ static int rcu_print_task_stall(struct rcu_node *rnp, unsigned long flags)
> > >  	raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
> > >  	while (i) {
> > >  		t = ts[--i];
> > > -		if (task_call_func(t, check_slow_task, &rscr))
> > > +		if (task_call_func(t, check_slow_task, &rscr)) {
> > >  			pr_cont(" P%d", t->pid);
> > > -		else
> > > -			pr_cont(" P%d/%d:%c%c%c%c%c%c",
> > > +		} else {
> > > +			tc = rscr.rcu_rdr_cpu_task;  
> > 
> > Is there a possible race between the call to rcu_cpu_curr() and here, where
> > that task could have exited and is freed?
> > 
> > There's no get_task_struct() on that task.  
> 
> The get_task_struct() happens in the list_for_each_entry_continue()
> loop that it right before the raw_spin_unlock_irqrestore_rcu_node().
> 
> Or do I have an off-by-one bug here?
> 

But doesn't that loop just cover the tasks in &rnp->blkd_tasks?

Does that include the task returned by cpu_curr(cpu) ?

-- Steve

  reply	other threads:[~2026-10-16 16:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14  0:41 Possible enhancement to RCU CPU stall warning messages Paul E. McKenney
2026-10-15 15:27 ` Clark Williams
2026-10-15 15:45   ` Paul E. McKenney
2026-10-16  7:13   ` Crystal Wood
2026-10-16 15:09     ` Paul E. McKenney
2026-10-16 15:23 ` Steven Rostedt
2026-10-16 16:00   ` Paul E. McKenney
2026-10-16 16:17     ` Steven Rostedt [this message]
2026-10-16 16:48       ` Paul E. McKenney
2026-10-16 16:54         ` Steven Rostedt
2026-10-16 17:05           ` Paul E. McKenney
2026-10-16 17:40             ` Steven Rostedt
2026-10-16 23:45               ` Paul E. McKenney
2026-10-17 19:02                 ` Paul E. McKenney
2026-10-18 14:21                   ` Steven Rostedt
2026-10-19 17:30                     ` Paul E. McKenney
2026-10-19 18:30                       ` Steven Rostedt
2026-10-19 19:24                         ` Paul E. McKenney
2026-10-19 19:28                           ` Steven Rostedt
2026-10-19 19:39                             ` Paul E. McKenney
2026-10-19 19:50                               ` Steven Rostedt
2026-10-19 20:29                                 ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261016121753.0da4e4e1@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=bigeasy@linutronix.de \
    --cc=clrkwllms@kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=paulmck@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox