Re: [PATCH V2] iommu/iova: Init the struct iova to fix the possible memleak

2019-12-17 Thread Joerg Roedel
On Mon, Dec 09, 2019 at 04:24:04PM +0800, Xiaotao Yin wrote: > The reason: > When alloc_iova_mem() without initial with Zero, sometimes fpn_lo will equal > to > IOVA_ANCHOR by chance, so when return from __alloc_and_insert_iova_range() > with > -ENOMEM(iova32_full), the new_iova will not be freed

RE: [PATCH V2] iommu/iova: Init the struct iova to fix the possible memleak

2019-12-09 Thread Yin, Xiaotao
> -Original Message- > From: Robin Murphy > Sent: Tuesday, December 10, 2019 3:34 AM > To: Yin, Xiaotao ; j...@8bytes.org; > iommu@lists.linux-foundation.org > Cc: linux-ker...@vger.kernel.org; Hao, Kexin > Subject: Re: [PATCH V2] iommu/iova: Init the struct iov

Re: [PATCH V2] iommu/iova: Init the struct iova to fix the possible memleak

2019-12-09 Thread Robin Murphy
On 09/12/2019 8:24 am, Xiaotao Yin wrote: During ethernet(Marvell octeontx2) set ring buffer test: ethtool -G eth1 rx tx following kmemleak will happen sometimes: unreferenced object 0x000b85421340 (size 64): comm "ethtool", pid 867, jiffies 4295323539 (age 550.500s) hex dump (first

[PATCH V2] iommu/iova: Init the struct iova to fix the possible memleak

2019-12-09 Thread Xiaotao Yin
During ethernet(Marvell octeontx2) set ring buffer test: ethtool -G eth1 rx tx following kmemleak will happen sometimes: unreferenced object 0x000b85421340 (size 64): comm "ethtool", pid 867, jiffies 4295323539 (age 550.500s) hex dump (first 64 bytes): 80 13 42 85 0b 00 ff ff ff ff f