From: Robin Murphy <robin.murphy@foss.arm.com>
To: Markus Elfring <Markus.Elfring@web.de>,
Akhilesh Patil <akhilesh@ee.iitb.ac.in>,
iommu@lists.linux.dev
Cc: akhileshpatilvnit@gmail.com, LKML <linux-kernel@vger.kernel.org>,
"Jason Gunthorpe" <jgg@nvidia.com>,
"Jason Gunthorpe" <jgg@ziepe.ca>, "Jörg Rödel" <joro@8bytes.org>,
"Kevin Tian" <kevin.tian@intel.com>,
"Lu Baolu" <baolu.lu@linux.intel.com>,
"Nicolin Chen" <nicolinc@nvidia.com>,
"Pranjal Shrivastava" <praan@google.com>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Will Deacon" <will@kernel.org>
Subject: Re: [PATCH] iommufd: viommu: free memory allocated by kvcalloc() using kvfree()
Date: Fri, 15 Aug 2025 15:15:33 +0100 [thread overview]
Message-ID: <5f0fa597-2f60-4110-8c52-6d006f5707b3@foss.arm.com> (raw)
In-Reply-To: <712b3b74-cfbd-45d8-8c19-6f2929b71358@web.de>
On 15/08/2025 2:42 pm, Markus Elfring wrote:
>> Use kvfree() instead of kfree() to free pages allocated by kvcalloc()
>> in iommufs_hw_queue_alloc_phys() to fix potential memory corruption.
>> Ensure the memory is properly freed, as kvcalloc may internally use
>> vmalloc or kmalloc depending on available memory in the system.
>
> Will another bit of background information become helpful
> for an improved change description?
No it will not. Please stop pointlessly nitpicking. A thing that is
allocated with kv*alloc() must be freed with kvfree(); that alone is all
that needs to be said to explain and justify any patch fixing this
particular bug.
Thanks,
Robin.
next prev parent reply other threads:[~2025-08-15 14:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-10 13:34 Akhilesh Patil
2025-08-10 17:53 ` Nicolin Chen
2025-08-15 10:06 ` Tian, Kevin
2025-08-15 10:45 ` Pranjal Shrivastava
2025-08-15 13:42 ` Markus Elfring
2025-08-15 14:15 ` Robin Murphy [this message]
2025-08-15 14:52 ` Markus Elfring
2025-08-18 14:14 ` Jason Gunthorpe
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=5f0fa597-2f60-4110-8c52-6d006f5707b3@foss.arm.com \
--to=robin.murphy@foss.arm.com \
--cc=Markus.Elfring@web.de \
--cc=akhilesh@ee.iitb.ac.in \
--cc=akhileshpatilvnit@gmail.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--cc=praan@google.com \
--cc=skhan@linuxfoundation.org \
--cc=will@kernel.org \
/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
all inboxes | Powered by JetHome®