Re: [PATCH stable-6.18.y] io_uring/net: Avoid msghdr on op_connect/op_bind async data
Greg KH <[email protected]>
| Newsgroups | org.kernel.vger.io-uring,org.kernel.vger.stable |
|---|---|
| Message-ID | <2026061804-slab-agent-a134@gregkh> |
On Wed, Jun 17, 2026 at 02:40:56PM -0400, Gabriel Krisman Bertazi wrote: > Greg KH <[email protected]> writes: > > > On Wed, Jun 17, 2026 at 01:51:02PM -0400, Gabriel Krisman Bertazi wrote: > >> [ Upstream commit 3979840cd858f30f43ea9f4e7f7f1f56de82d698 ] > >> This fixes a memory leak due to the lack of the cleanup hook for the > >> iovec. The stable backport differs from upstream by dropping the > >> io_connect_bpf_populate hunk, which didn't exist at the time and by > >> fixing the merge conflict due to the introduction of > >> io_bind_file_create. > >> > >> Both IORING_OP_CONNECT and IORING_OP_BIND reuse the msghdr object just > >> to store the sockaddr. Beyond allocating a much larger object than > >> needed, msghdr can also wrap an iovec, which will be recycled > >> unnecessarily. This uses the sockaddr directly. > >> > >> Cc: [email protected] > >> Signed-off-by: Gabriel Krisman Bertazi <[email protected]> > >> Link: https://patch.msgid.link/[email protected] > >> Signed-off-by: Jens Axboe <[email protected]> > >> Signed-off-by: Gabriel Krisman Bertazi <[email protected]> > >> --- > >> io_uring/net.c | 36 ++++++++++++++++++------------------ > >> io_uring/opdef.c | 4 ++-- > >> 2 files changed, 20 insertions(+), 20 deletions(-) > > > > This isn't in any release yet? > > It is queued in Linus tree during the current merge window for 7.2 Ah, so it's not even in a released -rc yet. > > why just 6.18? > > The backports are slightly different, so they were sent separately. The bug > exists since 6.12. I missed seeing a backport for 7.0, shouldn't it also go there? thanks, greg k-h