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: <CACRpkdayKYeizBt=dspQ2VdsQvpc8iq7XeaT7SnRiCyMVO2Bsw@mail.gmail.com>
Date:   Fri, 26 Nov 2021 02:26:23 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Tang Bin <tangbin@...s.chinamobile.com>
Cc:     davem@...emloft.net, kuba@...nel.org, arnd@...db.de,
        wanjiabing@...o.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ptp: ixp46x: Fix error handling in ptp_ixp_probe()

On Fri, Nov 26, 2021 at 2:10 AM Tang Bin <tangbin@...s.chinamobile.com> wrote:

> In the function ptp_ixp_probe(), when get irq failed
> after executing platform_get_irq(), the negative value
> returned will not be detected here. So fix error handling
> in this place.
>
> Fixes: 9055a2f591629 ("ixp4xx_eth: make ptp support a platform driver")
> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>

OK the intention is right but:

> -           !ixp_clock.master_irq || !ixp_clock.slave_irq)
> +           (ixp_clock.master_irq < 0) || (ixp_clock.slave_irq < 0))

Keep disallowing 0. Because that is not a valid IRQ.

... <= 0 ...

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ