Skip to content

Commit a1ebbe0

Browse files
xue01-hegregkh
authored andcommitted
io_uring/uring_cmd: fix hybrid polling initialization issue
commit 63166b8 upstream. Modify the check for whether the timer is initialized during IO transfer when passthrough is used with hybrid polling, to ensure that it's always setup correctly. Cc: stable@vger.kernel.org Fixes: 01ee194 ("io_uring: add support for hybrid IOPOLL") Signed-off-by: hexue <xue01.he@samsung.com> Link: https://lore.kernel.org/r/20250512052025.293031-1-xue01.he@samsung.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 65fa4ee commit a1ebbe0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

io_uring/uring_cmd.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)
244244
return -EOPNOTSUPP;
245245
issue_flags |= IO_URING_F_IOPOLL;
246246
req->iopoll_completed = 0;
247+
if (ctx->flags & IORING_SETUP_HYBRID_IOPOLL) {
248+
/* make sure every req only blocks once */
249+
req->flags &= ~REQ_F_IOPOLL_STATE;
250+
req->iopoll_start = ktime_get_ns();
251+
}
247252
}
248253

249254
ret = file->f_op->uring_cmd(ioucmd, issue_flags);

0 commit comments

Comments
 (0)