Re: WARNING: fs/proc/generic.c:173 __xlate_proc_name

Kent Gibson
2024-02-13T03:04:15Z

On Mon, Feb 12, 2024 at 03:11:43PM +0100, Bartosz Golaszewski wrote:
> On Mon, Feb 12, 2024 at 2:47 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:

...

> > > >
> > > > I'm not sure where this should be fixed.
> >
> > Any names ending up in sysfs cannot contain a slash?
>
> It's actually procfs. Every irq has an entry under /proc/irq/xyz/
> containing a directory named after the name of the interrupt. In this
> case the path of the directory would have been /proc/irq/xyz/R1/S1 but
> of course this wouldn't work. Should we replace every `/` in GPIO line
> names with `:` for interrupts?
>

Agreed that the consumer label (not the GPIO name, btw), needs to be
sanitized before being used to create the procfs path, what I am uncertain
about is whether that should be performed in cdev, irq or even procfs.
If cdev then I would also like to see irq document that the devname cannot
contain slashes - it currently only states:

* @devname: An ascii name for the claiming device

Sanitizing with ":" works for me.

Cheers,
Kent.