From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org
Cc: Christian Brauner <brauner@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/1] lib/iov_iter: fix import_iovec_ubuf iovec management
Date: Fri, 31 Jan 2025 09:12:42 -0700 [thread overview]
Message-ID: <e32c027d-7487-49d5-9f44-71e3dba0ecc2@kernel.dk> (raw)
In-Reply-To: <94e650e0-fad7-4929-877a-560700cd12ce@gmail.com>
On 1/31/25 9:06 AM, Pavel Begunkov wrote:
> On 1/31/25 14:13, Pavel Begunkov wrote:
>> import_iovec() says that it should always be fine to kfree the iovec
>> returned in @iovp regardless of the error code. __import_iovec_ubuf()
>> never reallocates it and thus should clear the pointer even in cases
>> when copy_iovec_*() fail.
>
> To be fair, all callers I checked don't look at the returned iovec
> if import_iovec*() fails, but I didn't track down all of them.
Yep I also checked too and didn't spot any issues from this, but it's
still prudent to clean it up.
--
Jens Axboe
prev parent reply other threads:[~2025-01-31 16:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-31 14:13 [PATCH 1/1] lib/iov_iter: fix import_iovec_ubuf iovec management Pavel Begunkov
2025-01-31 14:29 ` Jens Axboe
2025-01-31 16:06 ` Pavel Begunkov
2025-01-31 16:12 ` Jens Axboe [this message]
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=e32c027d-7487-49d5-9f44-71e3dba0ecc2@kernel.dk \
--to=axboe@kernel.dk \
--cc=akpm@linux-foundation.org \
--cc=asml.silence@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox