* [PATCH 1/1] io_uring/net: fix cleanup after recycle
@ 2022-12-19 15:11 Pavel Begunkov
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Begunkov @ 2022-12-19 15:11 UTC (permalink / raw)
To: io-uring; +Cc: Jens Axboe, asml.silence
Don't access io_async_msghdr io_netmsg_recycle(), it may be reallocated.
Cc: [email protected]
Fixes: 9bb66906f23e5 ("io_uring: support multishot in recvmsg")
Signed-off-by: Pavel Begunkov <[email protected]>
---
io_uring/net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/net.c b/io_uring/net.c
index 5229976cb582..7395b2c99f86 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -819,10 +819,10 @@ int io_recvmsg(struct io_kiocb *req, unsigned int issue_flags)
goto retry_multishot;
if (mshot_finished) {
- io_netmsg_recycle(req, issue_flags);
/* fast path, check for non-NULL to avoid function call */
if (kmsg->free_iov)
kfree(kmsg->free_iov);
+ io_netmsg_recycle(req, issue_flags);
req->flags &= ~REQ_F_NEED_CLEANUP;
}
--
2.38.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] io_uring/net: fix cleanup after recycle
@ 2022-12-19 17:00 Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2022-12-19 17:00 UTC (permalink / raw)
To: io-uring, Pavel Begunkov
On Mon, 19 Dec 2022 15:11:40 +0000, Pavel Begunkov wrote:
> Don't access io_async_msghdr io_netmsg_recycle(), it may be reallocated.
>
>
Applied, thanks!
[1/1] io_uring/net: fix cleanup after recycle
commit: 6c3e8955d4bd9811a6e1761eea412a14fb51a2e6
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-19 17:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-19 15:11 [PATCH 1/1] io_uring/net: fix cleanup after recycle Pavel Begunkov
-- strict thread matches above, loose matches on Subject: below --
2022-12-19 17:00 Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox