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: <537EC8A5.8070508@oracle.com>
Date:	Fri, 23 May 2014 00:03:49 -0400
From:	Sasha Levin <sasha.levin@...cle.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	Ingo Molnar <mingo@...nel.org>, Mel Gorman <mgorman@...e.de>,
	Rik van Riel <riel@...hat.com>,
	Dave Jones <davej@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: sched: spinlock recursion in migrate_swap_stop

On 05/22/2014 02:59 AM, Peter Zijlstra wrote:
> On Wed, May 21, 2014 at 10:34:44PM -0400, Sasha Levin wrote:
>> On 05/21/2014 12:49 PM, Peter Zijlstra wrote:
>>> On Wed, May 21, 2014 at 03:19:48PM +0200, Peter Zijlstra wrote:
>>>>> On Wed, May 21, 2014 at 09:08:26AM -0400, Sasha Levin wrote:
>>>>>>> +++ b/kernel/sched/core.c
>>>>>>> @@ -1154,6 +1156,7 @@ int migrate_swap(struct task_struct *cur, struct task_struct *p)
>>>>>>>                 goto out;
>>>>>>>
>>>>>>>         trace_sched_swap_numa(cur, arg.src_cpu, p, arg.dst_cpu);
>>>>>>> +       BUG_ON(cur == p);
>>>>>>>         ret = stop_two_cpus(arg.dst_cpu, arg.src_cpu, migrate_swap_stop, &arg);
>>>>>>>
>>>>>>>  out:
>>>>>>>
>>>>>>>
>>>>>>> Which seems to get hit. This sounds like a race with task moving to
>>>>>>> other cpu maybe?
>>>>>
>>>>> Oi, good call that, lemme go stare.
>>> I think something simple like this should be sufficient to avoid the
>>> problem of selecting oneself as a flip target.
>>
>> Why would that happen in the first place?
> 
> We do all that with preemption enabled, because its big and expensive,
> so its entirely possible that current (env->p) got moved around while we
> were doing it, at which point we'll look at it as a possible dst, while
> its already our src.

Seems to be working fine now, thanks!


Thanks,
Sasha

--
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