From: Jens Axboe <axboe@kernel.dk>
To: Christian Brauner <brauner@kernel.org>
Cc: io-uring@vger.kernel.org, asml.silence@gmail.com,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/5] fs: gate final fput task_work on PF_NO_TASKWORK
Date: Mon, 14 Apr 2025 08:29:35 -0600 [thread overview]
Message-ID: <85587075-1d54-4b79-94d4-39f615eeee24@kernel.dk> (raw)
In-Reply-To: <20250414-unwiderruflich-daheim-8e14b89e7845@brauner>
On 4/14/25 4:10 AM, Christian Brauner wrote:
> On Fri, Apr 11, 2025 at 08:37:51AM -0600, Jens Axboe wrote:
>> On 4/11/25 7:48 AM, Christian Brauner wrote:
>>> Seems fine. Although it has some potential for abuse. So maybe a
>>> VFS_WARN_ON_ONCE() that PF_NO_TASKWORK is only used with PF_KTHREAD
>>> would make sense.
>>
>> Can certainly add that. You'd want that before the check for
>> in_interrupt and PF_NO_TASKWORK? Something ala
>>
>> /* PF_NO_TASKWORK should only be used with PF_KTHREAD */
>> VFS_WARN_ON_ONCE((task->flags & PF_NO_TASKWORK) && !(task->flags & PF_KTHREAD));
>>
>> ?
>
> Yeah, sounds good!
I used the usual XOR trick for this kind of test, but placed in the same
spot:
https://git.kernel.dk/cgit/linux/commit/?h=io_uring-exit-cancel.2&id=d5ab108781ccc2f0f013fe009a010a1f29a4785d
--
Jens Axboe
next prev parent reply other threads:[~2025-04-14 14:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 13:35 [PATCHSET v3 0/5] Cancel and wait for all requests on exit Jens Axboe
2025-04-09 13:35 ` [PATCH 1/5] fs: gate final fput task_work on PF_NO_TASKWORK Jens Axboe
2025-04-11 13:48 ` Christian Brauner
2025-04-11 14:37 ` Jens Axboe
2025-04-14 10:10 ` Christian Brauner
2025-04-14 14:29 ` Jens Axboe [this message]
2025-04-14 17:11 ` Mateusz Guzik
2025-04-14 19:35 ` Jens Axboe
2025-04-09 13:35 ` [PATCH 2/5] io_uring: mark exit side kworkers as task_work capable Jens Axboe
2025-04-11 13:55 ` Christian Brauner
2025-04-11 14:38 ` Jens Axboe
2025-04-09 13:35 ` [PATCH 3/5] io_uring: consider ring dead once the ref is marked dying Jens Axboe
2025-04-09 13:35 ` [PATCH 4/5] io_uring: wait for cancelations on final ring put Jens Axboe
2025-04-09 13:35 ` [PATCH 5/5] io_uring: switch away from percpu refcounts Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2025-03-21 19:24 [PATCHSET RFC v2 0/5] Cancel and wait for all requests on exit Jens Axboe
2025-03-21 19:24 ` [PATCH 1/5] fs: gate final fput task_work on PF_NO_TASKWORK Jens Axboe
2024-06-04 19:01 [PATCHSET RFC 0/5] Wait on cancelations at release time Jens Axboe
2024-06-04 19:01 ` [PATCH 1/5] fs: gate final fput task_work on PF_NO_TASKWORK Jens Axboe
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=85587075-1d54-4b79-94d4-39f615eeee24@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=brauner@kernel.org \
--cc=io-uring@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.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