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: <aQOT8zD1hsK4SJ_c@hovoldconsulting.com>
Date: Thu, 30 Oct 2025 17:36:03 +0100
From: Johan Hovold <johan@...nel.org>
To: Philipp Zabel <p.zabel@...gutronix.de>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
	dri-devel@...ts.freedesktop.org, imx@...ts.linux.dev,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] drm/imx/tve: fix probe device leak

On Thu, Oct 30, 2025 at 04:27:39PM +0100, Philipp Zabel wrote:
> On Di, 2025-09-23 at 17:13 +0200, Johan Hovold wrote:

> >  static int imx_tve_probe(struct platform_device *pdev)
> >  {
> >  	struct device *dev = &pdev->dev;
> > @@ -546,6 +553,11 @@ static int imx_tve_probe(struct platform_device *pdev)
> >  	if (ddc_node) {
> >  		tve->ddc = of_find_i2c_adapter_by_node(ddc_node);
> >  		of_node_put(ddc_node);
> > +
> > +		ret = devm_add_action_or_reset(dev, imx_tve_put_device,
> > +					       &tve->ddc->dev);
> 
> I think this needs to be wrapped in "if (tve->ddc) { }",
> of_find_i2c_adapter_by_node() can return NULL.

Indeed, thanks for catching that. Just sent a v2.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ