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: <CAKxU2N8TsYHvM7a_Dhu34xHbvrWev9eL8VOa1JZcu_naW3fwjg@mail.gmail.com>
Date: Mon, 2 Sep 2024 13:26:59 -0700
From: Rosen Penev <rosenp@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com, 
	kuba@...nel.org, pabeni@...hat.com, linux-kernel@...r.kernel.org, 
	jacob.e.keller@...el.com, horms@...nel.org, sd@...asysnail.net, 
	chunkeey@...il.com
Subject: Re: [PATCH 2/6] net: ibm: emac: manage emac_irq with devm

On Mon, Sep 2, 2024 at 1:06 PM Andrew Lunn <andrew@...n.ch> wrote:
>
> On Mon, Sep 02, 2024 at 11:15:11AM -0700, Rosen Penev wrote:
> > It's the last to go in remove. Safe to let devm handle it.
> >
> > Also move request_irq to probe for clarity. It's removed in _remove not
> > close.
> >
> > Use dev_err instead of printk. Handles names automatically.
> >
> > +     /* Setup error IRQ handler */
> > +     err = devm_request_irq(&ofdev->dev, dev->emac_irq, emac_irq, 0, "EMAC", dev);
> > +     if (err) {
> > +             dev_err(&ofdev->dev, "failed to request IRQ %d", dev->emac_irq);
> > +             goto err_gone;
> > +     }
>
> Is this an internal interrupt, or a GPIO? It could be it is done in
> open because there is a danger the GPIO controller has not probed
> yet. So here you might get an EPROBE_DEFFER, where as the much older
> kernel this was written for might not of done, if just gave an error
> had gave up. So dev_err_probe() might be better.
Good call on that. In my experience, I get these EPROBE_DEFER errors
on OpenWrt's ath79 target (QCA MIPS) but not on PowerPC when trying to
use GPIOs. Nevertheless it seems to be good practice to use
dev_err_probe anyway. Will fix in v2.
>
>         Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ