Re: [PATCH 3/3] io_uring: refactor io_sq_offload_create()
From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2021-07-23 00:10:36
Also in:
linux-fsdevel
From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2021-07-23 00:10:36
Also in:
linux-fsdevel
On Thu, Jul 22, 2021 at 05:42:55PM -0600, Jens Axboe wrote:
quoted
So how can we possibly get there with tsk->files == NULL and what does it have to do with files, anyway?It's not the clearest, but the files check is just to distinguish between exec vs normal cancel. For exec, we pass in files == NULL. It's not related to task->files being NULL or not, we explicitly pass NULL for exec.
Er... So turn that argument into bool cancel_all, and pass false on exit and true on exit? While we are at it, what happens if you pass io_uring descriptor to another process, close yours and then have the recepient close the one it has gotten? AFAICS, io_ring_ctx_wait_and_kill(ctx) will be called in context of a process that has never done anything io_uring-related. Can it end up trying to resubmit some requests? I rather hope it can't happen, but I don't see what would prevent it...