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: <aWYSSa0w4eNdRyEC@hovoldconsulting.com>
Date: Tue, 13 Jan 2026 10:37:13 +0100
From: Johan Hovold <johan@...nel.org>
To: Lee Jones <lee@...nel.org>
Cc: Aaro Koskinen <aaro.koskinen@....fi>,
	Andreas Kemnade <andreas@...nade.info>,
	Kevin Hilman <khilman@...libre.com>,
	Roger Quadros <rogerq@...nel.org>, Tony Lindgren <tony@...mide.com>,
	linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH] mfd: omap-usb-host: fix OF populate on driver rebind

On Fri, Jan 09, 2026 at 04:37:25PM +0000, Lee Jones wrote:
> On Fri, 19 Dec 2025, Johan Hovold wrote:
> 
> > Since commit c6e126de43e7 ("of: Keep track of populated platform
> > devices") child devices will not be created by of_platform_populate()
> > if the devices had previously been deregistered individually so that the
> > OF_POPULATED flag is still set in the corresponding OF nodes.
> > 
> > Switch to using of_platform_depopulate() instead of open coding so that
> > the child devices are created if the driver is rebound.
> > 
> > Fixes: c6e126de43e7 ("of: Keep track of populated platform devices")
> > Cc: stable@...r.kernel.org	# 3.16
> > Signed-off-by: Johan Hovold <johan@...nel.org>

> > @@ -819,8 +819,10 @@ static void usbhs_omap_remove(struct platform_device *pdev)
> >  {
> >  	pm_runtime_disable(&pdev->dev);
> >  
> > -	/* remove children */
> > -	device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child);
> > +	if (pdev->dev.of_node)
> > +		of_platform_depopulate(&pdev->dev);
> 
> devm_of_platform_populate()?

Looks like that would work here, but I prefer using explicit removal for
both the OF and non-OF for symmetry and readability reasons.

If you think that the non-OF support can be removed then a devres
conversion can be done as part of that change.

> > +	else
> > +		device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child);

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ