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] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR04MB3976F81086B9D212C98F7E35ECED0@AM6PR04MB3976.eurprd04.prod.outlook.com>
Date:   Fri, 6 Nov 2020 21:59:04 +0000
From:   "Madalin Bucur (OSS)" <madalin.bucur@....nxp.com>
To:     Yu Kuai <yukuai3@...wei.com>
CC:     Jakub Kicinski <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        Florinel Iordache <florinel.iordache@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "yi.zhang@...wei.com" <yi.zhang@...wei.com>
Subject: RE: [PATCH V2] fsl/fman: add missing put_devcie() call in
 fman_port_probe()

> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: 05 November 2020 03:31
> To: Yu Kuai <yukuai3@...wei.com>
> Cc: Madalin Bucur <madalin.bucur@....com>; davem@...emloft.net; Florinel
> Iordache <florinel.iordache@....com>; netdev@...r.kernel.org; linux-
> kernel@...r.kernel.org; yi.zhang@...wei.com
> Subject: Re: [PATCH V2] fsl/fman: add missing put_devcie() call in
> fman_port_probe()
> 
> On Tue, 3 Nov 2020 19:23:23 +0800 Yu Kuai wrote:
> > --- a/drivers/net/ethernet/freescale/fman/fman_port.c
> > +++ b/drivers/net/ethernet/freescale/fman/fman_port.c
> > @@ -1792,20 +1792,21 @@ static int fman_port_probe(struct
> platform_device *of_dev)
> >  	if (!fm_node) {
> >  		dev_err(port->dev, "%s: of_get_parent() failed\n", __func__);
> >  		err = -ENODEV;
> > -		goto return_err;
> > +		goto free_port;
> >  	}
> >
> > +	of_node_put(port_node);
> >  	fm_pdev = of_find_device_by_node(fm_node);
> >  	of_node_put(fm_node);
> >  	if (!fm_pdev) {
> >  		err = -EINVAL;
> > -		goto return_err;
> > +		goto free_port;
> >  	}
> 
> This is not right either. I just asked you fix up the order of the
> error path, not move the of_node_put() in the body of the function.
> 
> Now you're releasing the reference on the object and still use it after.

If you manage to put together a v3, please also address the typo in the
subject (put_devcie).

Madalin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ