Hi Lukasz,
20. 3. 5. ìì 7:00ì Lukasz Luba ì(ê) ì ê:
There is a memory leak which left some objects not freed. The reference
counter of mapping: 'mapping->kref' was 2 when calling
arm_iommu_detach_device(), so the release_iommu_mapping() won't be called.
Since the old mapping structure is not going to be used any more (because
it is detached and new one attached), call arm_iommu_release_mapping()
to trigger cleanup.
Found using kmemleak detector, the output:
Signed-off-by: Lukasz Luba <lukasz.luba@xxxxxxx>
---
Hi all,
I have discovered this issue on OdroidXU4 while running some stress tests
for upcoming Energy Model. To reproduce it, kernel must be compiled with
DEBUG_KMEMLEAK. When the boot has finished, type:
# echo scan > /sys/kernel/debug/kmemleak
# cat /sys/kernel/debug/kmemleak
You should expect similar output to the one from the commit message.
I don't know if it should go via stable tree as well. I can resend with CC
stable, if there is a need.
Thanks for fixup. BTW, as you commented on Marek's patch thread, with Marek's patch the memory leak will be solved.
Do you want Marek to rework his patch on top of your patch or are you ok me to pick up only Marek's one?
Marek's patch is conflicted with your one.
Thanks,
Inki Dae