[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whn=gkf8kOxVPPeTpcgsFk21P9sk4SZRQ26=Jhqo6ewRA@mail.gmail.com>
Date: Tue, 16 Aug 2022 09:58:56 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Hector Martin <marcan@...can.st>
Cc: Boqun Feng <boqun.feng@...il.com>, Will Deacon <will@...nel.org>,
Herbert Xu <herbert@...dor.apana.org.au>,
Tejun Heo <tj@...nel.org>, peterz@...radead.org,
jirislaby@...nel.org, maz@...nel.org, mark.rutland@....com,
catalin.marinas@....com, oneukum@...e.com,
roman.penyaev@...fitbricks.com, asahi@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] workqueue: Fix memory ordering race in queue_work*()
On Tue, Aug 16, 2022 at 9:22 AM Hector Martin <marcan@...can.st> wrote:
>
> It's worth pointing out that the workqueue code does *not* pair
> test_and_set_bit() with clear_bit(). It does an atomic_long_set()
> instead
Yes. That code is much too subtle.
And yes, I think those barriers are
(a) misleading
(b) don't work with the "serialize bits using spinlock" model at all
It's a good example of "we need to really have a better model for this".
Linus
Powered by blists - more mailing lists