* [PATCH] usb: ulpi: Fix debugfs directory leak
@ 2024-01-26 22:38 Sean Anderson
2024-01-30 14:18 ` Heikki Krogerus
0 siblings, 1 reply; 2+ messages in thread
From: Sean Anderson @ 2024-01-26 22:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-usb
Cc: linux-kernel, Heikki Krogerus, Sean Anderson, stable
The ULPI per-device debugfs root is named after the ulpi device's
parent, but ulpi_unregister_interface tries to remove a debugfs
directory named after the ulpi device itself. This results in the
directory sticking around and preventing subsequent (deferred) probes
from succeeding. Change the directory name to match the ulpi device.
Fixes: bd0a0a024f2a ("usb: ulpi: Add debugfs support")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---
drivers/usb/common/ulpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
index 84d91b1c1eed..0886b19d2e1c 100644
--- a/drivers/usb/common/ulpi.c
+++ b/drivers/usb/common/ulpi.c
@@ -301,7 +301,7 @@ static int ulpi_register(struct device *dev, struct ulpi *ulpi)
return ret;
}
- root = debugfs_create_dir(dev_name(dev), ulpi_root);
+ root = debugfs_create_dir(dev_name(&ulpi->dev), ulpi_root);
debugfs_create_file("regs", 0444, root, ulpi, &ulpi_regs_fops);
dev_dbg(&ulpi->dev, "registered ULPI PHY: vendor %04x, product %04x\n",
--
2.35.1.1320.gc452695387.dirty
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] usb: ulpi: Fix debugfs directory leak
2024-01-26 22:38 [PATCH] usb: ulpi: Fix debugfs directory leak Sean Anderson
@ 2024-01-30 14:18 ` Heikki Krogerus
0 siblings, 0 replies; 2+ messages in thread
From: Heikki Krogerus @ 2024-01-30 14:18 UTC (permalink / raw)
To: Sean Anderson; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, stable
On Fri, Jan 26, 2024 at 05:38:00PM -0500, Sean Anderson wrote:
> The ULPI per-device debugfs root is named after the ulpi device's
> parent, but ulpi_unregister_interface tries to remove a debugfs
> directory named after the ulpi device itself. This results in the
> directory sticking around and preventing subsequent (deferred) probes
> from succeeding. Change the directory name to match the ulpi device.
>
> Fixes: bd0a0a024f2a ("usb: ulpi: Add debugfs support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
>
> drivers/usb/common/ulpi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
> index 84d91b1c1eed..0886b19d2e1c 100644
> --- a/drivers/usb/common/ulpi.c
> +++ b/drivers/usb/common/ulpi.c
> @@ -301,7 +301,7 @@ static int ulpi_register(struct device *dev, struct ulpi *ulpi)
> return ret;
> }
>
> - root = debugfs_create_dir(dev_name(dev), ulpi_root);
> + root = debugfs_create_dir(dev_name(&ulpi->dev), ulpi_root);
> debugfs_create_file("regs", 0444, root, ulpi, &ulpi_regs_fops);
>
> dev_dbg(&ulpi->dev, "registered ULPI PHY: vendor %04x, product %04x\n",
> --
> 2.35.1.1320.gc452695387.dirty
--
heikki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-30 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-26 22:38 [PATCH] usb: ulpi: Fix debugfs directory leak Sean Anderson
2024-01-30 14:18 ` Heikki Krogerus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®