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: <CAMuHMdVxi2QJ2nz8JBrm0bFLRwkwdtgoBMX8N3wtzdLDvCw6gA@mail.gmail.com>
Date: Wed, 24 Apr 2024 11:19:27 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Sergey Shtylyov <s.shtylyov@....ru>
Cc: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>, 
	Paul Barker <paul.barker.ct@...renesas.com>, 
	Niklas Söderlund <niklas.soderlund+renesas@...natech.se>, 
	"David S . Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org, 
	linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH] net: ravb: Fix registered interrupt names

Hi Sergey,

On Wed, Apr 24, 2024 at 11:10 AM Sergey Shtylyov <s.shtylyov@....ru> wrote:
> On 4/24/24 10:45 AM, Geert Uytterhoeven wrote:
> > As interrupts are now requested from ravb_probe(), before calling
> > register_netdev(), ndev->name still contains the template "eth%d",
> > leading to funny names in /proc/interrupts.  E.g. on R-Car E3:
> >
> >       89:  0      0  GICv2  93 Level  eth%d:ch22:multi
> >       90:  0      3  GICv2  95 Level  eth%d:ch24:emac
> >       91:  0  23484  GICv2  71 Level  eth%d:ch0:rx_be
> >       92:  0      0  GICv2  72 Level  eth%d:ch1:rx_nc
> >       93:  0  13735  GICv2  89 Level  eth%d:ch18:tx_be
> >       94:  0      0  GICv2  90 Level  eth%d:ch19:tx_nc
> >
> > Worse, on platforms with multiple RAVB instances (e.g. R-Car V4H), all
> > interrupts have similar names.
> >
> > Fix this by using the device name instead, like is done in several other
> > drivers:
> >
> >       89:  0      0  GICv2  93 Level  e6800000.ethernet:ch22:multi
> >       90:  0      1  GICv2  95 Level  e6800000.ethernet:ch24:emac
> >       91:  0  28578  GICv2  71 Level  e6800000.ethernet:ch0:rx_be
> >       92:  0      0  GICv2  72 Level  e6800000.ethernet:ch1:rx_nc
> >       93:  0  14044  GICv2  89 Level  e6800000.ethernet:ch18:tx_be
> >       94:  0      0  GICv2  90 Level  e6800000.ethernet:ch19:tx_nc
>
>    Ugh! Sorry about missing this one...
>
> > Rename the local variable dev_name, as it shadows the dev_name()
> > function, and pre-initialize it, to simplify the code.
>
>    Why not call it just name instead?

Because the function has a parameter named "irq_name".
"devname" also matches the corresponding parameter of
devm_request_irq().

>
> > Fixes: 32f012b8c01ca9fd ("net: ravb: Move getting/requesting IRQs in the probe() method")
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
>
> Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ