On Wed May 29, 2024 at 8:53 AM CEST, Akhil R wrote: > > The only iommu function call in this driver is a > > tegra_dev_iommu_get_stream_id() which does not allocate anything and does > > not take any reference. > > > > More-over, what is freed is "se->dev" which has been devm_kzalloc()'ed in the > > probe. > > I did not completely understand what is being tried to convey here. > If I understand it right, iommu_fwspec_free() does not do anything > with the "devm_kzalloc"ed variable. > > It would probably be a good idea to remove this line from the commit message. Yeah, I think that's a bit misleading. What iommu_fwspec_free() does is get the iommu_fwspec from the passed-in device and then frees that iommu_fwspec. That said, as I was looking around I didn't spot anything that was calling iommu_fwspec_free() in any of the cleanup paths, so either I'm missing something or it's a real memory leak (though perhaps one that we are ignoring on purpose because these are usually attached to devices that don't just go away). Thierry
Attachment:
signature.asc
Description: PGP signature