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: <1153855844.8932.56.camel@laptopd505.fenrus.org>
Date:	Tue, 25 Jul 2006 21:30:44 +0200
From:	Arjan van de Ven <arjan@...ux.intel.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Linus Torvalds <torvalds@...l.org>,
	Chuck Ebbert <76306.1226@...puserve.com>,
	Ashok Raj <ashok.raj@...el.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Dave Jones <davej@...hat.com>, Andrew Morton <akpm@...l.org>
Subject: Re: remove cpu hotplug bustification in cpufreq.

On Tue, 2006-07-25 at 20:54 +0200, Ingo Molnar wrote:
> * Linus Torvalds <torvalds@...l.org> wrote:
> 
> > The current -git tree will complain about some of the more obvious 
> > problems. If you see a "Lukewarm IQ" message, it's a sign of somebody 
> > re-taking a cpu lock that is already held.
> 
> testing on my latest-rawhide laptop (kernel-2.6.17-1.2445.fc6 and later 
> rpms have this change) seems to have pushed the problem over to another 
> lock:
> 
>   S06cpuspeed/1580 is trying to acquire lock:
>    (&policy->lock){--..}, at: [<c06075f9>] mutex_lock+0x21/0x24
> 
>   but task is already holding lock:
>    (cpu_bitmask_lock){--..}, at: [<c06075f9>] mutex_lock+0x21/0x24
> 
>   which lock already depends on the new lock.


so cpufreq_set_policy() takes policy->lock, and then calls into the
userspace governer code
(__cpufreq_set_policy->cpufreq_governor->cpufreq_governor_userspace)
which calls __cpufreq_driver_target... which does lock_cpu_hotplug().


now on the other side:
store_scaling_governor() has the following code:

        lock_cpu_hotplug();

        /* Do not use cpufreq_set_policy here or the user_policy.max
           will be wrongly overridden */
        mutex_lock(&policy->lock);

so that's the entirely opposite lock order, and a classic AB-BA
deadlock.

Greetings,
     Arjan -- who's just cleaned Linus' wall to prepare it for more head
banging


-
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