[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zbi_y9w6ze7qfxQ2@slm.duckdns.org>
Date: Mon, 29 Jan 2024 23:22:19 -1000
From: Tejun Heo <tj@...nel.org>
To: torvalds@...ux-foundation.org, mpatocka@...hat.com,
Lai Jiangshan <jiangshanlai@...il.com>
Cc: linux-kernel@...r.kernel.org, dm-devel@...ts.linux.dev,
msnitzer@...hat.com, ignat@...udflare.com, damien.lemoal@....com,
houtao1@...wei.com, peterz@...radead.org, mingo@...nel.org,
netdev@...r.kernel.org, allen.lkml@...il.com, kernel-team@...a.com
Subject: Re: [PATCHSET wq/for-6.9] workqueue: Implement BH workqueue and
convert several tasklet users
Oops, forgot to cc Lai.
On Mon, Jan 29, 2024 at 11:11:47PM -1000, Tejun Heo wrote:
> Hello,
>
> The only generic interface to execute asynchronously in the BH context is
> tasklet; however, it's marked deprecated and has some design flaws such as
> the execution code accessing the tasklet item after the execution is
> complete which can lead to subtle use-after-free in certain usage scenarios
> and less-developed flush and cancel mechanisms.
>
> Mikulas Patocka recently reported that dm-crypt and dm-crypt are affected by
> the access-after-completion issue and suggested adding TASKLET_STATE_ONESHOT
> flag which selectively removes post-completion access while significantly
> limiting how the tasklet can be used in the following thread:
>
> http://lkml.kernel.org/r/82b964f0-c2c8-a2c6-5b1f-f3145dc2c8e5@redhat.com
>
> Linus didn't like the approach and suggested extending workqueue to support
> execution from atomic context:
>
> http://lkml.kernel.org/r/CAHk-=wjDW53w4-YcSmgKC5RruiRLHmJ1sXeYdp_ZgVoBw=5byA@mail.gmail.com
>
> As suggested, this patchset implements BH workqueues which are like regular
> workqueues but executes work items in the BH (softirq) context and converts
> several tasklet users.
Lai, the patchset is at:
http://lkml.kernel.org/r/20240130091300.2968534-1-tj@kernel.org
I'd really appreciate if you can take a look.
Thanks.
--
tejun
Powered by blists - more mailing lists