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]
Date:   Tue, 17 Nov 2020 09:32:01 +0100
From:   Neil Armstrong <narmstrong@...libre.com>
To:     Yu Kuai <yukuai3@...wei.com>, khilman@...libre.com
Cc:     yi.zhang@...wei.com, linux-kernel@...r.kernel.org,
        linux-amlogic@...ts.infradead.org, zhangxiaoxu5@...wei.com,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] soc: amlogic: canvas: add missing put_device() call in
 meson_canvas_get()

On 17/11/2020 02:13, Yu Kuai wrote:
> if of_find_device_by_node() succeed, meson_canvas_get() doesn't have
> a corresponding put_device(). Thus add put_device() to fix the exception
> handling for this function implementation.
> 
> Fixes: commit 382f8be04551 ("soc: amlogic: canvas: Fix meson_canvas_get when probe failed")
> Signed-off-by: Yu Kuai <yukuai3@...wei.com>
> ---
>  drivers/soc/amlogic/meson-canvas.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/amlogic/meson-canvas.c b/drivers/soc/amlogic/meson-canvas.c
> index c655f5f92b12..d0329ad170d1 100644
> --- a/drivers/soc/amlogic/meson-canvas.c
> +++ b/drivers/soc/amlogic/meson-canvas.c
> @@ -72,8 +72,10 @@ struct meson_canvas *meson_canvas_get(struct device *dev)
>  	 * current state, this driver probe cannot return -EPROBE_DEFER
>  	 */
>  	canvas = dev_get_drvdata(&canvas_pdev->dev);
> -	if (!canvas)
> +	if (!canvas) {
> +		put_device(&canvas_pdev->dev);
>  		return ERR_PTR(-EINVAL);
> +	}
>  
>  	return canvas;
>  }
> 

Reviewed-by: Neil Armstrong <narmstrong@...libre.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ