[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB52769BA153FFF6A5339A0A208C34A@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Fri, 15 Aug 2025 10:06:26 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Akhilesh Patil <akhilesh@...iitb.ac.in>, "jgg@...pe.ca" <jgg@...pe.ca>,
"joro@...tes.org" <joro@...tes.org>, "will@...nel.org" <will@...nel.org>,
"robin.murphy@....com" <robin.murphy@....com>, "praan@...gle.com"
<praan@...gle.com>, "baolu.lu@...ux.intel.com" <baolu.lu@...ux.intel.com>,
"nicolinc@...dia.com" <nicolinc@...dia.com>, "jgg@...dia.com"
<jgg@...dia.com>
CC: "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"akhileshpatilvnit@...il.com" <akhileshpatilvnit@...il.com>,
"skhan@...uxfoundation.org" <skhan@...uxfoundation.org>
Subject: RE: [PATCH] iommufd: viommu: free memory allocated by kvcalloc()
using kvfree()
> From: Akhilesh Patil <akhilesh@...iitb.ac.in>
> Sent: Sunday, August 10, 2025 9:34 PM
>
> 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.
>
> Fixes: 2238ddc2b056 ("iommufd/viommu: Add
> IOMMUFD_CMD_HW_QUEUE_ALLOC ioctl")
> Signed-off-by: Akhilesh Patil <akhilesh@...iitb.ac.in>
Reviewed-by: Kevin Tian <kevin.tian@...el.com>
Powered by blists - more mailing lists