lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 12 Jun 2023 16:28:07 +0100
From:   Valentin Schneider <vschneid@...hat.com>
To:     John Stultz <jstultz@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     Arve Hjønnevåg <arve@...roid.com>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        android-kernel-team <android-kernel-team@...gle.com>,
        John Stultz <jstultz@...gle.com>
Subject: Re: [RESEND][PATCH v2] sched/wait: Fix a kthread_park race with
 wait_woken()

On 02/06/23 21:23, John Stultz wrote:
> From: Arve Hjønnevåg <arve@...roid.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@...hat.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Juri Lelli <juri.lelli@...hat.com>
> Cc: Vincent Guittot <vincent.guittot@...aro.org>
> Cc: Dietmar Eggemann <dietmar.eggemann@....com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Ben Segall <bsegall@...gle.com>
> Cc: Mel Gorman <mgorman@...e.de>
> Cc: Daniel Bristot de Oliveira <bristot@...hat.com>
> Cc: Valentin Schneider <vschneid@...hat.com>
> Cc: android-kernel-team <android-kernel-team@...gle.com>
> Signed-off-by: Arve Hjønnevåg <arve@...roid.com>
> [jstultz: Made changes suggested by Peter to optimize
>  memory loads]
> Signed-off-by: John Stultz <jstultz@...gle.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@...hat.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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ