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:	Mon, 12 Oct 2015 13:17:41 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Kieran Bingham <kieranbingham@...il.com>
Cc:	Wolfram Sang <wsa@...-dreams.de>,
	Linux I2C <linux-i2c@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] i2c: return probe deferred status on dev_pm_domain_attach

On Mon, Oct 12, 2015 at 12:49 PM, Kieran Bingham
<kieranbingham@...il.com> wrote:
> A change of return status was introduced in commit 3fffd1283927
> ("i2c: allow specifying separate wakeup interrupt in device tree")
>
> The commit prevents the defer status being passed up the call stack
> appropriately when dev_pm_domain_attach returns -EPROBE_DEFER.

Ah, indeed, sorry about that.

>
> Catch the PROBE_DEFER and clear up the IRQ wakeup status
>
> Signed-off-by: Kieran Bingham <kieranbingham@...il.com>
> Fixes: 3fffd1283927 ("i2c: allow specifying separate wakeup
> interrupt in device tree")
>
> ---
> V2:
>  Fall through the error path before returning -EPROBE_DEFER
>
>  drivers/i2c/i2c-core.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
> index 5f89f1e3c2f2..51f20cce1732 100644
> --- a/drivers/i2c/i2c-core.c
> +++ b/drivers/i2c/i2c-core.c
> @@ -699,6 +699,8 @@ static int i2c_device_probe(struct device *dev)
>                                         client));
>                 if (status)
>                         goto err_detach_pm_domain;
> +       } else {
> +               goto err_clear_wakeup_irq;
>         }

How about we do:

        status = dev_pm_domain_attach(&client->dev, true);
        if (status == -EPROBE_DEFER)
                goto err_clear_wakeup_irq;

        status = driver->probe(client, i2c_match_id(driver->id_table, client));
        ....

instead of doing "else"?

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ