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:	Fri, 05 Jun 2015 13:08:14 -0400
From:	Rik van Riel <riel@...hat.com>
To:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>
CC:	linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] stop_machine: Fix deadlock between multiple stop_two_cpus()

On 06/05/2015 11:30 AM, Peter Zijlstra wrote:
> 
> Jiri reported a machine stuck in multi_cpu_stop() with
> migrate_swap_stop() as function and with the following src,dst cpu
> pairs: {11,  4} {13, 11} { 4, 13}
> 
>                         4       11      13
> 
> cpuM: queue(4 ,13)
>                         *Ma
> cpuN: queue(13,11)
>                                 *N      Na
>                         *M              Mb
> cpuO: queue(11, 4)
>                         *O      Oa
>                                 *Nb
>                         *Ob
> 
> Where *X denotes the cpu running the queueing of cpu-X and X[ab] denotes
> the first/second queued work.
> 
> You'll observe the top of the workqueue for each cpu: 4,11,13 to be work
> from cpus: M, O, N resp. IOW. deadlock.
> 
> Do away with the queueing trickery and introduce lg_double_lock() to
> lock both CPUs and fully serialize the stop_two_cpus() callers instead
> of the partial (and buggy) serialization we have now.
> 
> Completely untested..
> 
> Reported-by: Jiri Olsa <jolsa@...hat.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>

Certainly looks like it would work.

I suspect we should probably apply this patch after some basic
testing, since the race is so incredibly hard to reproduce.

-- 
All rights reversed
--
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