[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <712b3b74-cfbd-45d8-8c19-6f2929b71358@web.de>
Date: Fri, 15 Aug 2025 15:42:42 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Akhilesh Patil <akhilesh@...iitb.ac.in>, iommu@...ts.linux.dev
Cc: akhileshpatilvnit@...il.com, LKML <linux-kernel@...r.kernel.org>,
Jason Gunthorpe <jgg@...dia.com>, Jason Gunthorpe <jgg@...pe.ca>,
Jörg Rödel <joro@...tes.org>,
Kevin Tian <kevin.tian@...el.com>, Lu Baolu <baolu.lu@...ux.intel.com>,
Nicolin Chen <nicolinc@...dia.com>, Pranjal Shrivastava <praan@...gle.com>,
Robin Murphy <robin.murphy@....com>, Shuah Khan <skhan@...uxfoundation.org>,
Will Deacon <will@...nel.org>
Subject: Re: [PATCH] iommufd: viommu: free memory allocated by kvcalloc()
using kvfree()
> 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?
Test command example:
Markus_Elfring@...ne:…/Projekte/Linux/next-analyses> /usr/bin/spatch -D report scripts/coccinelle/api/kfree_mismatch.cocci drivers/iommu/iommufd/viommu.c
…
Regards,
Markus
Powered by blists - more mailing lists