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]
Date:   Tue, 14 Nov 2017 10:19:32 +0000
From:   Marc Zyngier <marc.zyngier@....com>
To:     Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc:     Wei Yongjun <weiyongjun1@...wei.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jason Cooper <jason@...edaemon.net>,
        "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] irqchip/exiu: Fix return value check in exiu_init()

On Tue, Nov 14 2017 at  9:55:46 am GMT, Ard Biesheuvel <ard.biesheuvel@...aro.org> wrote:
> On 14 November 2017 at 06:57, Wei Yongjun <weiyongjun1@...wei.com> wrote:
>> In case of error, the function of_iomap() returns NULL pointer not
>> ERR_PTR(). The IS_ERR() test in the return value check should be
>> replaced with NULL test.
>>
>> Fixes: 706cffc1b912 ("irqchip/exiu: Add support for Socionext Synquacer EXIU controller")
>> Signed-off-by: Wei Yongjun <weiyongjun1@...wei.com>
>> ---
>>  drivers/irqchip/irq-sni-exiu.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/irqchip/irq-sni-exiu.c b/drivers/irqchip/irq-sni-exiu.c
>> index 1b6e2f7..1927b2f 100644
>> --- a/drivers/irqchip/irq-sni-exiu.c
>> +++ b/drivers/irqchip/irq-sni-exiu.c
>> @@ -196,8 +196,8 @@ static int __init exiu_init(struct device_node *node,
>>         }
>>
>>         data->base = of_iomap(node, 0);
>> -       if (IS_ERR(data->base)) {
>> -               err = PTR_ERR(data->base);
>> +       if (!data->base) {
>> +               err = -ENODEV;
>>                 goto out_free;
>>         }
>>
>
> I was going to blame Marc's Tegra code for this, because that is where
> I copied most of the code from, but the bug doesn't exist there, and
> so it appears to be an original work. Oops.

Ah, nice try! ;-)

> Acked-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>

Applied to irqchip-4.15, thanks both.

	M.
-- 
Jazz is not dead, it just smell funny.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ