From: Valentin Schneider <vschneid@redhat.com>
To: John Stultz <jstultz@google.com>, LKML <linux-kernel@vger.kernel.org>
Cc: "Arve Hjønnevåg" <arve@android.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>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Ben Segall" <bsegall@google.com>, "Mel Gorman" <mgorman@suse.de>,
"Daniel Bristot de Oliveira" <bristot@redhat.com>,
android-kernel-team <android-kernel-team@google.com>,
"John Stultz" <jstultz@google.com>
Subject: Re: [RESEND][PATCH v2] sched/wait: Fix a kthread_park race with wait_woken()
Date: Mon, 12 Jun 2023 16:28:07 +0100 [thread overview]
Message-ID: <xhsmho7lkya2g.mognet@vschneid.remote.csb> (raw)
In-Reply-To: <20230602212350.535358-1-jstultz@google.com>
On 02/06/23 21:23, John Stultz wrote:
> From: Arve Hjønnevåg <arve@android.com>
>
> kthread_park and wait_woken have a similar race that
> kthread_stop and wait_woken used to have before it was fixed in
> commit cb6538e740d7 ("sched/wait: Fix a kthread race with
> wait_woken()"). Extend that fix to also cover kthread_park.
>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Juri Lelli <juri.lelli@redhat.com>
> Cc: Vincent Guittot <vincent.guittot@linaro.org>
> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ben Segall <bsegall@google.com>
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Daniel Bristot de Oliveira <bristot@redhat.com>
> Cc: Valentin Schneider <vschneid@redhat.com>
> Cc: android-kernel-team <android-kernel-team@google.com>
> Signed-off-by: Arve Hjønnevåg <arve@android.com>
> [jstultz: Made changes suggested by Peter to optimize
> memory loads]
> Signed-off-by: John Stultz <jstultz@google.com>
Funny one, IIUC this will happen with any wakeup of a wait_woken()-user
that doesn't touch the wait_queue entry.
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
I do have on question: what about signals? Browsing through wait_woken()
users, it looks like a few of them have a wait-loop break condition hinging
on signal_pending() (iio_buffer_read() is one of them). signal_wake_up()
doesn't touch the wait_queue entry, so is that a similar issue or am I
looking at a non-problem?
next prev parent reply other threads:[~2023-06-12 15:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 21:23 John Stultz
2023-06-12 15:28 ` Valentin Schneider [this message]
2023-06-15 11:38 ` [tip: sched/core] " tip-bot2 for Arve Hjønnevåg
2023-06-16 15:16 ` tip-bot2 for Arve Hjønnevåg
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=xhsmho7lkya2g.mognet@vschneid.remote.csb \
--to=vschneid@redhat.com \
--cc=android-kernel-team@google.com \
--cc=arve@android.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=jstultz@google.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=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.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
all inboxes | Powered by JetHome®