Re: FAILED: patch "[PATCH] cpufreq: Avoid crash in resume on SMP without OPP" failed to apply to 3.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

On Tue, Nov 18, 2014 at 9:06 PM,  <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> The patch below does not apply to the 3.12-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@xxxxxxxxxxxxxxx>.

I believe the crash can only happen on trees including
commit 6e2c89d16d987e6e11c531b039a42d3f5f1d7c32
Author: viresh kumar <viresh.kumar@xxxxxxxxxx>
Date:   Tue Mar 4 11:43:59 2014 +0800

    cpufreq: move call to __find_governor() to cpufreq_init_policy()

which appeared in v3.15-rc1.

AFAIK it hasn't been backported (yet :-) to v3.12.x, v3.13.x or v3.14.x.

> thanks,
>
> greg k-h
>
> ------------------ original commit in Linus's tree ------------------
>
> From 09712f557b31838092e1f22a5f2dd131a843a3de Mon Sep 17 00:00:00 2001
> From: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> Date: Tue, 4 Nov 2014 17:05:25 +0100
> Subject: [PATCH] cpufreq: Avoid crash in resume on SMP without OPP
>
> When resuming from s2ram on an SMP system without cpufreq operating
> points (e.g. there's no "operating-points" property for the CPU node in
> DT, or the platform doesn't use DT yet), the kernel crashes when
> bringing CPU 1 online:
>
>     Enabling non-boot CPUs ...
>     CPU1: Booted secondary processor
>     Unable to handle kernel NULL pointer dereference at virtual address 0000003c
>     pgd = ee5e6b00
>     [0000003c] *pgd=6e579003, *pmd=6e588003, *pte=00000000
>     Internal error: Oops: a07 [#1] SMP ARM
>     Modules linked in:
>     CPU: 0 PID: 1246 Comm: s2ram Tainted: G        W      3.18.0-rc3-koelsch-01614-g0377af242bb175c8-dirty #589
>     task: eeec5240 ti: ee704000 task.ti: ee704000
>     PC is at __cpufreq_add_dev.isra.24+0x24c/0x77c
>     LR is at __cpufreq_add_dev.isra.24+0x244/0x77c
>     pc : [<c0298efc>]    lr : [<c0298ef4>]    psr: 60000153
>     sp : ee705d48  ip : ee705d48  fp : ee705d84
>     r10: c04e0450  r9 : 00000000  r8 : 00000001
>     r7 : c05426a8  r6 : 00000001  r5 : 00000001  r4 : 00000000
>     r3 : 00000000  r2 : 00000000  r1 : 20000153  r0 : c0542734
>
> Verify that policy is not NULL before dereferencing it to fix this.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> Fixes: 8414809c6a1e (cpufreq: Preserve policy structure across suspend/resume)
> Cc: 3.12+ <stable@xxxxxxxxxxxxxxx> # 3.12+
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 644b54e1e7d1..4473eba1d6b0 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1022,7 +1022,8 @@ static struct cpufreq_policy *cpufreq_policy_restore(unsigned int cpu)
>
>         read_unlock_irqrestore(&cpufreq_driver_lock, flags);
>
> -       policy->governor = NULL;
> +       if (policy)
> +               policy->governor = NULL;
>
>         return policy;
>  }

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]