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]
Message-ID: <CAHQ1cqG0=_ONFALzqCmsvKU-Lm4TFqjuiNWF=qz-GGm+5EJGag@mail.gmail.com>
Date:   Thu, 11 Jul 2019 20:25:19 -0700
From:   Andrey Smirnov <andrew.smirnov@...il.com>
To:     Wolfram Sang <wsa@...-dreams.de>
Cc:     Chris Healy <cphealy@...il.com>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-i2c@...r.kernel.org
Subject: Re: [PATCH] i2c: imx: Initialize DMA before registering I2C adapter

On Sat, Jun 8, 2019 at 10:57 PM Andrey Smirnov <andrew.smirnov@...il.com> wrote:
>
> Allocating DMA after registering I2C adapter can lead to infinite
> probing loop, for example, consider the following scenario:
>
>     1. i2c_imx_probe() is called and successfully registers an I2C
>        adapter via i2c_add_numbered_adapter()
>
>     2. As a part of i2c_add_numbered_adapter() new I2C slave devices
>        are added from DT which results in a call to
>        driver_deferred_probe_trigger()
>
>     3. i2c_imx_probe() continues and calls i2c_imx_dma_request() which
>        due to lack of proper DMA driver returns -EPROBE_DEFER
>
>     4. i2c_imx_probe() fails, removes I2C adapter and returns
>        -EPROBE_DEFER, which places it into deferred probe list
>
>     5. Deferred probe work triggered in #2 above kicks in and calls
>        i2c_imx_probe() again thus bringing us to step #1
>
> To avoid having this problem, move i2c_imx_dma_request() to happen
> before i2c_add_numbered_adapter().
>
> This problem was encountered on VF610 CFU1 board with
> CONFIG_FSL_EDMA=n.
>
> Signed-off-by: Andrey Smirnov <andrew.smirnov@...il.com>
> Cc: Chris Healy <cphealy@...il.com>
> Cc: Wolfram Sang <wsa@...-dreams.de>
> Cc: Fabio Estevam <festevam@...il.com>
> Cc: NXP Linux Team <linux-imx@....com>
> Cc: linux-i2c@...r.kernel.org
> Cc: linux-arm-kernel@...ts.infradead.org
> Cc: linux-kernel@...r.kernel.org

Gentle ping. Any feedback on this?

Thanks,
Andrey Smirnov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ