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] [day] [month] [year] [list]
Date:   Mon, 24 Apr 2017 12:52:09 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     David Miller <davem@...emloft.net>, bianpan201602@....com
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        bianpan2016@....com
Subject: Re: [PATCH 1/1] net: bcmgenet: fix incorrect return value checks

On 04/24/2017 12:48 PM, David Miller wrote:
> From: Pan Bian <bianpan201602@....com>
> Date: Sun, 23 Apr 2017 18:01:05 +0800
> 
>> From: Pan Bian <bianpan2016@....com>
>>
>> Function platform_get_irq() will return a negative value on errors.
>> However, in function bcmgenet_probe(), 0 is considered as a flag of
>> error. This patch fixes the bug by checking whether the return value of
>> platform_get_irq() is less than 0.
>>
>> Signed-off-by: Pan Bian <bianpan2016@....com>
> 
> I'm definitely not confident enough to apply this.
> 
> On some platform zero IRQs are invalid.
> 
> There are also lots of pieces of code that check the return value ">
> 0" as success.
> 

I don't think we are fixing any real issue by applying this patch, but I
will do a check on ARM, ARM64 and MIPS where this driver is used to see
if it is even remotely possible to have a 0 IRQ.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ