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: <a0f03f69-ec5f-c667-c440-173c7d363c7f@arm.com>
Date:   Tue, 31 Jul 2018 13:38:07 +0200
From:   Dietmar Eggemann <dietmar.eggemann@....com>
To:     Peter Zijlstra <peterz@...radead.org>, jiada_wang@...tor.com
Cc:     mingo@...hat.com, linux-kernel@...r.kernel.org,
        Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH 1/1] sched/debug: fix potential deadlock when write to
 sched_features

On 07/31/2018 12:34 PM, Peter Zijlstra wrote:
> 
> Leaving a lot of quoted crud for Viresh..
> 
> On Tue, Jul 31, 2018 at 06:22:19PM +0900, jiada_wang@...tor.com wrote:
>> From: Jiada Wang <jiada_wang@...tor.com>
>>
>> Following lockdep report can be triggered by write to
>> /sys/kernel/debug/sched_features
> 
> Only if you're using this dt_cpufreq thing of course.. I wonder why this
> hasn't been reported before.
> 

[...]

> 
> I don't much care for all the _cpuslocked renaming done, but otherwise I
> suppose this is the easiest fix.
> 
> Note however that this doesn't apply, you're missing that match_string()
> patch. Please use tip/sched/core or something.

With the patch tweaked onto tip/sched/core.

w/o the patch:

root@...0:~# echo NO_LB_BIAS > /sys/kernel/debug/sched_features
[  293.052451]
[  293.053978] ======================================================   
[  293.060166] WARNING: possible circular locking dependency detected   
[  293.066358] 4.18.0-rc5-00064-gae48698275b3 #1 Tainted: G S
[  293.073153] ------------------------------------------------------   
[  293.079340] bash/3490 is trying to acquire lock:
[  293.083966] 00000000155b9437 (cpu_hotplug_lock.rw_sem){++++}, at: static_key_disable+0x1c/0x38
[  293.092620]
[  293.092620] but task is already holding lock:
[  293.098459] 0000000084a95e1c (&sb->s_type->i_mutex_key#3){+.+.}, at: sched_feat_write+0xc4/0x1e0
[  293.107277]
[  293.107277] which lock already depends on the new lock.
...

w/ the patch:

root@...0:~# echo NO_LB_BIAS > /sys/kernel/debug/sched_features
root@...0:~#

Tested-by: Dietmar Eggemann <dietmar.eggemann@....com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ