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: <BY5PR11MB4182B03BCF3FE98A5B0054D78CC49@BY5PR11MB4182.namprd11.prod.outlook.com>
Date:   Mon, 23 Aug 2021 23:24:38 +0000
From:   "Chrisanthus, Anitha" <anitha.chrisanthus@...el.com>
To:     jing yangyang <cgel.zte@...il.com>
CC:     "Dea, Edmund J" <edmund.j.dea@...el.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        jing yangyang <jing.yangyang@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: RE: [PATCH linux-next] : add put_device() after
 of_find_device_by_node()

Acked-by: Anitha Chrisanthus <anitha.chrisanthus@...el.com>

> -----Original Message-----
> From: jing yangyang <cgel.zte@...il.com>
> Sent: Thursday, August 19, 2021 7:10 PM
> To: Chrisanthus, Anitha <anitha.chrisanthus@...el.com>
> Cc: Dea, Edmund J <edmund.j.dea@...el.com>; David Airlie <airlied@...ux.ie>;
> Daniel Vetter <daniel@...ll.ch>; dri-devel@...ts.freedesktop.org; linux-
> kernel@...r.kernel.org; jing yangyang <jing.yangyang@....com.cn>; Zeal
> Robot <zealci@....com.cn>
> Subject: [PATCH linux-next] : add put_device() after of_find_device_by_node()
> 
> This was found by coccicheck:
> ./drivers/gpu/drm/kmb/kmb_drv.c:503:2-8:
> ERROR  missing put_device; call of_find_device_by_node on line 490,
> but without a corresponding object release within this function.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: jing yangyang <jing.yangyang@....com.cn>
> ---
>  drivers/gpu/drm/kmb/kmb_drv.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/kmb/kmb_drv.c
> b/drivers/gpu/drm/kmb/kmb_drv.c
> index f54392e..58495a9 100644
> --- a/drivers/gpu/drm/kmb/kmb_drv.c
> +++ b/drivers/gpu/drm/kmb/kmb_drv.c
> @@ -500,8 +500,10 @@ static int kmb_probe(struct platform_device *pdev)
>  	ret = kmb_dsi_host_bridge_init(get_device(&dsi_pdev->dev));
> 
>  	if (ret == -EPROBE_DEFER) {
> +		put_device(&dsi_pdev->dev);
>  		return -EPROBE_DEFER;
>  	} else if (ret) {
> +		put_device(&dsi_pdev->dev);
>  		DRM_ERROR("probe failed to initialize DSI host bridge\n");
>  		return ret;
>  	}
> @@ -509,9 +511,10 @@ static int kmb_probe(struct platform_device *pdev)
>  	/* Create DRM device */
>  	kmb = devm_drm_dev_alloc(dev, &kmb_driver,
>  				 struct kmb_drm_private, drm);
> -	if (IS_ERR(kmb))
> +	if (IS_ERR(kmb)) {
> +		put_device(&dsi_pdev->dev);
>  		return PTR_ERR(kmb);
> -
> +	}
>  	dev_set_drvdata(dev, &kmb->drm);
> 
>  	/* Initialize MIPI DSI */
> --
> 1.8.3.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ