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:   Wed, 29 Nov 2017 10:53:09 +0000
From:   Mark Brown <broonie@...nel.org>
To:     arvindY <arvind.yadav.cs@...il.com>
Cc:     Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        tiwai@...e.com, lgirdwood@...il.com,
        linux-mediatek@...ts.infradead.org, matthias.bgg@...il.com,
        linux@...linux.org.uk, linux-arm-kernel@...ts.infradead.org
Subject: Re: [alsa-devel] [PATCH 1/5 v4] ASoC: ep93xx-ac97: Fix
 platform_get_irq's error checking

On Mon, Nov 20, 2017 at 09:31:40PM +0530, arvindY wrote:
> On Monday 20 November 2017 07:07 PM, Alexandre Belloni wrote:
> > On 19/11/2017 at 09:45:00 +0530, Arvind Yadav wrote:

> > To ensure this doesn't get applied: platform_get_irq can return
> > -EPROBE_DEFER and this must be handled properly.

> Yes, you are right. We should retry to get an irq for device. But ASoC
>  driver is not retrying. if platfore_get_irq() fail here, Driver is throwing
> an error.
> and this patch is only to fix error checking which is not correct in Driver.

> > >   	irq = platform_get_irq(pdev, 0);
> > > -	if (!irq)
> > > +	if (irq <= 0)
> > >   		return -ENODEV;

This is just squashing all error codes into -ENODEV, we'd be handling
probe deferral properly if we just returned the raw error code here.  We
need separate handling for irq == 0 which is an error but not an error
code and for cases where we've got an error code.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ