From: Phil Auld <pauld@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Harshit Agarwal <harshit@nutanix.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Jon Kohler <jon@nutanix.com>,
Gauri Patwardhan <gauri.patwardhan@nutanix.com>,
Rahul Chunduru <rahul.chunduru@nutanix.com>,
Will Ton <william.ton@nutanix.com>
Subject: Re: [PATCH v2] sched/rt: Fix race in push_rt_task
Date: Wed, 26 Mar 2025 09:18:21 -0400 [thread overview]
Message-ID: <20250326131821.GA144611@pauld.westford.csb> (raw)
In-Reply-To: <20250217115409.05599bd2@gandalf.local.home>
On Mon, Feb 17, 2025 at 11:54:09AM -0500 Steven Rostedt wrote:
> On Fri, 14 Feb 2025 17:08:44 +0000
> Harshit Agarwal <harshit@nutanix.com> wrote:
>
> > Co-developed-by: Jon Kohler <jon@nutanix.com>
> > Signed-off-by: Jon Kohler <jon@nutanix.com>
> > Co-developed-by: Gauri Patwardhan <gauri.patwardhan@nutanix.com>
> > Signed-off-by: Gauri Patwardhan <gauri.patwardhan@nutanix.com>
> > Co-developed-by: Rahul Chunduru <rahul.chunduru@nutanix.com>
> > Signed-off-by: Rahul Chunduru <rahul.chunduru@nutanix.com>
> > Signed-off-by: Harshit Agarwal <harshit@nutanix.com>
> > Tested-by: Will Ton <william.ton@nutanix.com>
> > ---
> > Changes in v2:
> > - As per Steve's suggestion, removed some checks that are done after
> > obtaining the lock that are no longer needed with the addition of new
> > check.
> > - Moved up is_migration_disabled check.
> > - Link to v1:
> > https://lore.kernel.org/lkml/20250211054646.23987-1-harshit@nutanix.com/
> > ---
> > kernel/sched/rt.c | 54 +++++++++++++++++++++++------------------------
> > 1 file changed, 26 insertions(+), 28 deletions(-)
>
>
> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
>
We've got some cases that look to be hitting this as well.
I'm a little concerned about turning some runtime checks into
BUG_ON()s but in this case I think we are really just going to
trap out on !has_pushable_tasks() check first and if not, pick
a different task and don't drop the lock so it should pass the
BUG_ON()s and fail to match the original task. So...
Reviewed-by: Phil Auld <pauld@redhat.com>
Cheers,
Phil
> Peter or Ingo,
>
> Care to take his patch
>
> Thanks,
>
> -- Steve
>
--
next prev parent reply other threads:[~2025-03-26 13:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 17:08 [PATCH v2] sched/rt: Fix race in push_rt_task Harshit Agarwal
2025-02-14 17:12 ` kernel test robot
2025-02-17 16:54 ` Steven Rostedt
2025-03-26 13:18 ` Phil Auld [this message]
2025-03-26 17:57 ` Harshit Agarwal
2025-03-26 18:25 ` Phil Auld
-- strict thread matches above, loose matches on Subject: below --
2025-02-11 22:24 [PATCH] " Harshit Agarwal
2025-02-13 17:54 ` [PATCH v2] " Harshit Agarwal
2025-02-17 15:50 ` Steven Rostedt
2025-02-17 16:36 ` Harshit Agarwal
2025-02-17 16:53 ` Steven Rostedt
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=20250326131821.GA144611@pauld.westford.csb \
--to=pauld@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=gauri.patwardhan@nutanix.com \
--cc=harshit@nutanix.com \
--cc=jon@nutanix.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rahul.chunduru@nutanix.com \
--cc=rostedt@goodmis.org \
--cc=stable@vger.kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=william.ton@nutanix.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.