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: <f67899d2567eee74a0a8609a2330b59aab018122.camel@mediatek.com>
Date: Mon, 12 Aug 2024 03:53:15 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: "javier.carrasco.cruz@...il.com" <javier.carrasco.cruz@...il.com>,
	"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
	Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
	"daniel@...ll.ch" <daniel@...ll.ch>, "p.zabel@...gutronix.de"
	<p.zabel@...gutronix.de>, "airlied@...il.com" <airlied@...il.com>,
	"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
	"angelogioacchino.delregno@...labora.com"
	<angelogioacchino.delregno@...labora.com>
CC: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "stable@...r.kernel.org"
	<stable@...r.kernel.org>
Subject: Re: [PATCH 2/3] drm/mediatek: ovl_adaptor: add missing of_node_put()

Hi, Javier:

On Mon, 2024-06-24 at 18:43 +0200, Javier Carrasco wrote:
>  	 
> External email : Please do not click links or open attachments until you have verified the sender or the content.
>  Error paths that exit for_each_child_of_node() need to call
> of_node_put() to decerement the child refcount and avoid memory leaks.
> 
> Add the missing of_node_put().

Reviewed-by: CK Hu <ck.hu@...iatek.com>

> 
> Cc: stable@...r.kernel.org
> Fixes: 453c3364632a ("drm/mediatek: Add ovl_adaptor support for MT8195")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
> index 1418992311c4..3faf26a55e77 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
> @@ -522,8 +522,10 @@ static int ovl_adaptor_comp_init(struct device *dev, struct component_match **ma
>  }
>  
>  comp_pdev = of_find_device_by_node(node);
> -if (!comp_pdev)
> +if (!comp_pdev) {
> +of_node_put(node);
>  return -EPROBE_DEFER;
> +}
>  
>  priv->ovl_adaptor_comp[id] = &comp_pdev->dev;
>  
> 
> -- 
> 2.40.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ