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: <CA+55aFwKUJPh8NH9dHQwTLUkW=yN-=XYjUA46GO3pT-rjvExvA@mail.gmail.com>
Date:	Mon, 30 Nov 2015 17:47:37 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Sasha Levin <sasha.levin@...cle.com>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH] sched: remove false-positive warning from wake_up_process()

On Mon, Nov 30, 2015 at 5:34 PM, Sasha Levin <sasha.levin@...cle.com> wrote:
> Futex can have a spurious wake up before we actually wake it up on our own,
> which will trigger this warning if the task is still stopped.

Actually, I think it would presumably be the other way around: a
spurious stale futex wakeup happens *after* the process has been woken
up for some other reason and moved to stopped state.

(The "wake up and move to stopped state" could be for the same reason:
a SIGSTOP signal).

So the setup is presumably something like this:

 - on cpu1: futex code is about to go to sleep, adds itself to the
futex hash chains, but then gets interrupted by a SIGSTOP

 - in the meantime, on cpu2, the futex is changed, and the wakup code
sees the process from cpu1 on the futex hash chains

 - on cpu1, the process has now removed itself from the hash chains,
and goes through the signal code that sets the state to STOPPED

 - in the meantime, on cpu2, the futex code now gets around to waking
things up, and sees that stopped state

Roughly.

               Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ