Forwarded: io_uring/cmd: don't skip completion for a non-armed multishot uring_cmd

From: syzbot

Date: Tue Aug 11 2026 - 04:15:08 EST


For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.

***

Subject: io_uring/cmd: don't skip completion for a non-armed multishot uring_cmd
Author: vasilisalmpanis@xxxxxxxxx

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git dad19b6f6336e1587b0f767d5b4e2b5543224b43

diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c
index c14c22cff49e..a2899a852879 100644
--- a/io_uring/uring_cmd.c
+++ b/io_uring/uring_cmd.c
@@ -269,7 +269,8 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)
}

ret = file->f_op->uring_cmd(ioucmd, issue_flags);
- if (ioucmd->flags & IORING_URING_CMD_MULTISHOT) {
+ if ((ioucmd->flags & IORING_URING_CMD_MULTISHOT) &&
+ (req->flags & REQ_F_APOLL_MULTISHOT)) {
if (ret >= 0)
return IOU_ISSUE_SKIP_COMPLETE;
}