Re: [PATCH] io_uring/nop: fix file reference leak with IOSQE_FIXED_FILE
Jens Axboe <[email protected]>
| Newsgroups | org.kernel.vger.io-uring,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <178153987848.2073745.8254643716156280437.b4-ty@b4> |
On Mon, 15 Jun 2026 16:45:57 +0200, Vasileios Almpanis wrote:
> NOP file-acquisition support choses between a fixed (registered) file and
> a normal fget()'d file based on its own IORING_NOP_FIXED_FILE flag in
> sqe->nop_flags. However, a request's REQ_F_FIXED_FILE is set
> independently from the generic IOSQE_FIXED_FILE sqe flag during request
> init, before the issue handler runs.
>
> If a NOP is submitted with IOSQE_FIXED_FILE set (so REQ_F_FIXED_FILE is
> set) but without IORING_NOP_FIXED_FILE, io_nop() takes the normal path
> and grabs a real reference via io_file_get_normal(). On completion,
> io_put_file() only drops the reference when REQ_F_FIXED_FILE is clear,
> so the fget()'d file is never released and leaks:
>
> [...]
Applied, thanks!
[1/1] io_uring/nop: fix file reference leak with IOSQE_FIXED_FILE
commit: 1abb79a6afcfb45a46e1f4cd99321e561a46a444
Best regards,
--
Jens Axboe