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: <CAKohponxYknVgZQpubaCQ0d4fw_TJzxqavY0ssjR8Kyu988Y7g@mail.gmail.com>
Date:	Fri, 8 Feb 2013 08:22:54 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Artem Savkov <artem.savkov@...il.com>
Cc:	rjw@...k.pl, valdis.kletnieks@...edu, cpufreq@...r.kernel.org,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	linaro-dev@...ts.linaro.org, robin.randhawa@....com,
	Steve.Bannister@....com, Liviu.Dudau@....com
Subject: Re: [PATCH 0/4] CPUFreq Fixes for 3.9

On 8 February 2013 01:09, Artem Savkov <artem.savkov@...il.com> wrote:
> Tested out linux-pm.git/linux-next with this patches pulled. It seems
> that my systemd-sleep issue is fixed, however there is a new 'sleeping
> in invalid context' bug during boot:
>
> [   12.736484] BUG: sleeping function called from invalid context at mm/slub.c:925
> [   12.739727] in_atomic(): 1, irqs_disabled(): 1, pid: 1799, name: systemd-modules
> [   12.742961] 2 locks held by systemd-modules/1799:
> [   12.746153]  #0:  (subsys mutex#3){......}, at: [<c13f4056>] subsys_interface_register+0x36/0xb0
> [   12.749499]  #1:  (cpufreq_driver_lock){......}, at: [<c14ba53b>] cpufreq_add_dev+0x22b/0x3d0
> [   12.752865] Pid: 1799, comm: systemd-modules Not tainted 3.8.0-rc6+ #1
> [   12.756175] Call Trace:
> [   12.759538]  [<c1068150>] __might_sleep+0xe0/0x100
> [   12.762156]  [<c112a481>] kmem_cache_alloc_trace+0xb1/0x150
> [   12.765432]  [<f804e653>] ? acpi_cpufreq_cpu_init+0x73/0x5c0 [acpi_cpufreq]
> [   12.768780]  [<f804e653>] acpi_cpufreq_cpu_init+0x73/0x5c0 [acpi_cpufreq]
> [   12.772161]  [<c14ba53b>] ? cpufreq_add_dev+0x22b/0x3d0
> [   12.775549]  [<c1695af7>] ? _raw_spin_lock_irqsave+0x77/0x90
> [   12.778932]  [<c14ba53b>] ? cpufreq_add_dev+0x22b/0x3d0
> [   12.782307]  [<c14ba548>] cpufreq_add_dev+0x238/0x3d0

Can you please try out this:

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 819aa33..a77d0bc 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -919,17 +919,14 @@ static int cpufreq_add_dev(struct device *dev,
struct subsys_interface *sif)
        init_completion(&policy->kobj_unregister);
        INIT_WORK(&policy->update, handle_update);

-       spin_lock_irqsave(&cpufreq_driver_lock, flags);
        /* call driver. From then on the cpufreq must be able
         * to accept all calls to ->verify and ->setpolicy for this CPU
         */
        ret = driver->init(policy);
        if (ret) {
                pr_debug("initialization failed\n");
-               spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
                goto err_set_policy_cpu;
        }
-       spin_unlock_irqrestore(&cpufreq_driver_lock, flags);

        /* related cpus should atleast have policy->cpus */
        cpumask_or(policy->related_cpus, policy->related_cpus, policy->cpus);
--
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