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: <20ea4d6a3cd2a01fe0c5a5a6db1b2ed05548cf8f.camel@gmail.com>
Date:   Wed, 02 Nov 2022 16:27:06 +0100
From:   Nuno Sá <noname.nuno@...il.com>
To:     Ramona Bolboaca <ramona.bolboaca@...log.com>, jic23@...nel.org,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/8] Remove adis_initial_startup usage

On Wed, 2022-11-02 at 16:18 +0200, Ramona Bolboaca wrote:
> Remove adis_initial_startup usage due to the fact that it leads to a
> deadlock.
> The same mutex is acquired twice, without releasing it, once inside
> adis_initial_startup and once inside adis_enable_irq.
> Instead of adis_initial_startup, use __adis_initial_startup.
> 

Auchhhh!!! Thanks for catching this... However, the Fixes tag is
pointing to the wrong place. I'm fairly sure I introduced this bug in 

commit b600bd7eb3335 ("iio: adis: do not disabe IRQs in 'adis_init()'")

This was where the call to adis_enable_irq() was moved to
__adis_initial_startup() and effectively creating the deadlock for some
devices (adis->data->unmasked_drdy is not set)...


I guess I did not saw this when bringing in the change because I
probably tested the full series on some device supported by adis16475.c
where this won't trigger.

>From a quick look I think it's safe to drop adis_initial_startup() as
it is always called during probe() before registering the IIO device.
We could also just create an unlocked version of adis_enable_irq()
(since we don't need to grab the lock in this path) but likely not
worth the trouble.

- Nuno Sá

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ