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, 9 Oct 2017 17:24:49 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Lai Jiangshan <jiangshanlai@...il.com>
Cc:     Boqun Feng <boqun.feng@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Josef Bacik <josef@...icpanda.com>, Tejun Heo <tj@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC] workqueue: Fix irq inversion deadlock in manage_workers()

On Mon, Oct 09, 2017 at 05:40:43PM +0800, Lai Jiangshan wrote:
> I didn't thought this kind of pattern is very seldom.  I remember I saw several.

>   mutex_lock();
>   do_something();
>   spin_lock_irq();
>   record_the_state_for_ do_something().
>    // keep the spin lock held to hold the state for do_more_things().
>   mutex_unlock(); // unlock() is suggested to be called when just exiting C.S.
>   do_more_things();
>   spin_unlock_irq();
> 
> Was all code of this pattern removed?
> Could it be possible that mutex will be changed to allow this?

So I think we did something similar to the rt_mutex in:

  b4abf91047cf ("rtmutex: Make wait_lock irq safe")

And I would not be entirely against doing the same for our normal mutex,
but I've not really had time to read/think through this thread.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ