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]
Message-ID: <CAMpZ1qHUnTDQ78gdrQF9Sx_-XfLM-B+H-0bL1-+twKsno+JOvg@mail.gmail.com>
Date:   Thu, 7 Dec 2023 17:25:44 +0800
From:   Jensen Huang <jensenhuang@...endlyarm.com>
To:     Dragan Simic <dsimic@...jaro.org>
Cc:     Heiko Stuebner <heiko@...ech.de>,
        Andi Shyti <andi.shyti@...nel.org>,
        linux-arm-kernel@...ts.infradead.org,
        linux-rockchip@...ts.infradead.org, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Dmitry Osipenko <dmitry.osipenko@...labora.com>,
        Chris Morgan <macroalpha82@...il.com>,
        Benjamin Bara <bbara93@...il.com>
Subject: Re: [PATCH v2] i2c: rk3x: fix potential spinlock recursion on poll

On Thu, Dec 7, 2023 at 4:37 PM Dragan Simic <dsimic@...jaro.org> wrote:
>
> On 2023-12-07 09:21, Jensen Huang wrote:
> > Possible deadlock scenario (on reboot):
> > rk3x_i2c_xfer_common(polling)
> >     -> rk3x_i2c_wait_xfer_poll()
> >         -> rk3x_i2c_irq(0, i2c);
> >             --> spin_lock(&i2c->lock);
> >             ...
> >         <rk3x i2c interrupt>
> >         -> rk3x_i2c_irq(0, i2c);
> >             --> spin_lock(&i2c->lock); (deadlock here)
> >
> > Store the IRQ number and disable/enable it around the polling transfer.
> > This patch has been tested on NanoPC-T4.
>
> In case you haven't already seen the related discussion linked below,
> please have a look.  I also added more people to the list of recipients,
> in an attempt to make everyone aware of the different approaches to
> solving this issue.
>
> https://lore.kernel.org/all/655177f4.050a0220.d85c9.3ba0@mx.google.com/T/#m6fc9c214452fec6681843e7f455978c35c6f6c8b

Thank you for providing the information. I hadn't seen this link before.
After carefully looking into the related discussion, it appears that
Dmitry Osipenko is already working on a suitable patch. To avoid duplication
or conflicts, my patch can be discarded.

--
Best regards,
Jensen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ