From: Jens Axboe <axboe@kernel.dk>
To: syzbot <syzbot+641eec6b7af1f62f2b99@syzkaller.appspotmail.com>,
io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [io-uring?] memory leak in io_submit_sqes (5)
Date: Mon, 1 Dec 2025 14:31:35 -0700 [thread overview]
Message-ID: <f2fe83bd-79bd-40ea-a156-6a20ff24997f@kernel.dk> (raw)
In-Reply-To: <692dcb58.a70a0220.2ea503.00b5.GAE@google.com>
Let's try this again, seemed like a testing failure last time...
#syz test:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
diff --git a/io_uring/poll.c b/io_uring/poll.c
index b9681d0f9f13..0d5bb90d4743 100644
--- a/io_uring/poll.c
+++ b/io_uring/poll.c
@@ -936,12 +936,17 @@ int io_poll_remove(struct io_kiocb *req, unsigned int issue_flags)
ret2 = io_poll_add(preq, issue_flags & ~IO_URING_F_UNLOCKED);
/* successfully updated, don't complete poll request */
- if (!ret2 || ret2 == -EIOCBQUEUED)
+ if (ret2 == IOU_ISSUE_SKIP_COMPLETE)
goto out;
+ /* request completed as part of the update, complete it */
+ else if (ret2 == IOU_COMPLETE)
+ goto complete;
}
- req_set_fail(preq);
io_req_set_res(preq, -ECANCELED, 0);
+complete:
+ if (preq->cqe.res < 0)
+ req_set_fail(preq);
preq->io_task_work.func = io_req_task_complete;
io_req_task_work_add(preq);
out:
--
Jens Axboe
next prev parent reply other threads:[~2025-12-01 21:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 17:07 [syzbot] [io-uring?] memory leak in io_submit_sqes (5) syzbot
2025-12-01 20:16 ` Jens Axboe
2025-12-01 21:00 ` syzbot
2025-12-01 20:36 ` shaurya
2025-12-01 21:24 ` syzbot
2025-12-01 21:29 ` Jens Axboe
2025-12-01 21:31 ` Jens Axboe [this message]
2025-12-01 21:52 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f2fe83bd-79bd-40ea-a156-6a20ff24997f@kernel.dk \
--to=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+641eec6b7af1f62f2b99@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.