lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bfd6d40474d4d5f589a825b0cc193ae229c42d52.camel@mediatek.com>
Date:   Wed, 7 Sep 2022 11:10:11 +0800
From:   Yong Wu <yong.wu@...iatek.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
CC:     Joerg Roedel <joro@...tes.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Will Deacon <will@...nel.org>,
        Robin Murphy <robin.murphy@....com>, <iommu@...ts.linux.dev>,
        <iommu@...ts.linux-foundation.org>,
        <linux-mediatek@...ts.infradead.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        <mingyuan.ma@...iatek.com>, <yf.wang@...iatek.com>,
        <libo.kang@...iatek.com>, <chengci.xu@...iatek.com>,
        <youlin.pei@...iatek.com>, <anan.sun@...iatek.com>,
        <xueqi.zhang@...iatek.com>, Guenter Roeck <groeck@...omium.org>
Subject: Re: [PATCH v4 3/6] iommu/mediatek: Add error path for loop of
 mm_dts_parse

Hi Dan,

Thanks very much for your review:)

On Tue, 2022-08-30 at 11:32 +0300, Dan Carpenter wrote:
> On Wed, Aug 24, 2022 at 02:43:03PM +0800, Yong Wu wrote:
> > The mtk_iommu_mm_dts_parse will parse the smi larbs nodes. if the
> > i+1
> > larb is parsed fail, we should put_device for the 0..i larbs.
> > 
> > There are two places need to comment:
> > 1) The larbid may be not linear mapping, we should loop whole
> >    the array in the error path.
> > 2) I move this line position: "data->larb_imu[id].dev = &plarbdev-
> > >dev;"
> >    That means set data->larb_imu[id].dev before the error path.
> >    then we don't need "platform_device_put(plarbdev)" again while
> >    probe_defer case. All depend on "put_device" in the error path
> > in error
> >    cases.
> 
> I don't understand what you're saying here.  There is still a
> platform_device_put(plarbdev) on the success path after
> component_match_add().
> 
> So if we fail when i == 2 then we do:
> 
> 	put_device(data->larb_imu[2].dev);
> 
> But for the previous iterations has both platform_device_put()
> and put_device() called for them.

Sorry for this. Right! For the goto outside the loop, it did put twice.
I will fix this.

> 
> regards,
> dan carpenter
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ