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:	Fri, 10 Jun 2016 15:11:17 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] platform: don't return 0 from platform_get_irq[_byname]()
 on error

Hello.

On 5/28/2016 11:51 PM, Sergei Shtylyov wrote:

> of_irq_get[_byname]() return 0 iff irq_create_of_mapping() call fails.
> Returning both  error code and 0 on failure is a sign of a misdesigned API.
> We  should rely on the platform IRQ resource in this case, not return 0,
> especially as 0 can be a valid  IRQ resource too...

    Actually, I wanted to say that returning 0 on error makes the error check 
unnecessarily complex and error prone bu fogrgot about that when writing the 
changelog. Let me know what you think...

> Fixes: aff008ad813c ("platform_get_irq: Revert to platform_get_resource if of_irq_get fails")
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
> CC: stable@...r.kernel.org

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ