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