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:   Tue, 03 Aug 2021 23:10:30 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Davidlohr Bueso <dave@...olabs.net>
Subject: Re: [patch 58/63] futex: Prevent requeue_pi() lock nesting issue on RT

On Tue, Aug 03 2021 at 12:28, Peter Zijlstra wrote:

> On Mon, Aug 02, 2021 at 02:56:09PM +0200, Peter Zijlstra wrote:
>>  static inline void futex_requeue_pi_complete(struct futex_q *q, int locked)
>>  {
>> +	int old, new;
>>  
>> +	old = atomic_read_acquire(&q->requeue_state);
>> +	do {
>
> 		if (old == Q_REQUEUE_PI_IGNORE)
> 			return;
>
>>  		if (locked >= 0) {
>
> 			WARN_ON_ONCE(old != Q_REQUEUE_PI_IN_PROGRESS &&
> 			             old != Q_REQUEUE_PI_WAIT)
>
>>  			/* Requeue succeeded. Set DONE or LOCKED */
>>  			new = Q_REQUEUE_PI_DONE + locked;
>> +		} else if (old == Q_REQUEUE_PI_IN_PROGRESS) {
>>  			/* Deadlock, no early wakeup interleave */
>>  			new = Q_REQUEUE_PI_NONE;
>>  		} else {
>
> 			WARN_ON_ONCE(old != Q_REQUEUE_PI_WAIT);
>
>
> I think... 

Yes, it's matching the valid transition table.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ