Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338702 > unrolled thread

[PATCH] cpufreq_sched: set governor_data before waking up kschedfreq

Started byPingbo Wen <pingbo.wen@linaro.org>
First post2016-02-20 12:40 +0100
Last post2016-02-22 12:50 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] cpufreq_sched: set governor_data before waking up kschedfreq Pingbo Wen <pingbo.wen@linaro.org> - 2016-02-20 12:40 +0100
    Re: [Eas-dev] [PATCH] cpufreq_sched: set governor_data before waking  up kschedfreq Juri Lelli <juri.lelli@arm.com> - 2016-02-22 12:00 +0100
      Re: [Eas-dev] [PATCH] cpufreq_sched: set governor_data before waking  up kschedfreq Pingbo Wen <pingbo.wen@linaro.org> - 2016-02-22 12:40 +0100
        Re: [Eas-dev] [PATCH] cpufreq_sched: set governor_data before waking  up kschedfreq Juri Lelli <juri.lelli@arm.com> - 2016-02-22 12:50 +0100

#1338702 — [PATCH] cpufreq_sched: set governor_data before waking up kschedfreq

FromPingbo Wen <pingbo.wen@linaro.org>
Date2016-02-20 12:40 +0100
Subject[PATCH] cpufreq_sched: set governor_data before waking up kschedfreq
Message-ID<r4e3i-4EY-59@gated-at.bofh.it>
Fix null pointer dereference error liked below. This BUG can be easily
re-produced by 'monkey --throttle 50' in android 6.0.

Unable to handle kernel NULL pointer dereference at virtual address 00000010
[KERN Warning] check backtrace:
CPU: 0 PID: 10714 Comm: kschedfreq:0 Tainted:
Call trace:
[<ffffffc00008b8ac>] dump_backtrace+0x0/0x15c
[<ffffffc00008ba18>] show_stack+0x10/0x1c
[<ffffffc000b97bf8>] dump_stack+0x74/0xb8
[<ffffffc00036208c>] debug_locks_off+0x4c/0x7c
[<ffffffc0000a3450>] oops_enter+0xc/0x28
[<ffffffc00008ba50>] die+0x2c/0x1a4
[<ffffffc000b96588>] __do_kernel_fault.part.5+0x70/0x84
[<ffffffc00009c728>] do_page_fault+0x344/0x348
[<ffffffc00009c7e8>] do_translation_fault+0xbc/0xf0
[<ffffffc0000822b0>] do_mem_abort+0x38/0x9c
[<ffffffc000085c50>] el1_da+0x14/0x80
[<ffffffc0000c0168>] kthread+0xd4/0xec

Signed-off-by: Pingbo Wen <pingbo.wen@linaro.org>
---
 kernel/sched/cpufreq_sched.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/cpufreq_sched.c b/kernel/sched/cpufreq_sched.c
index e1d208e..93731ef 100644
--- a/kernel/sched/cpufreq_sched.c
+++ b/kernel/sched/cpufreq_sched.c
@@ -265,6 +265,8 @@ static int cpufreq_sched_policy_init(struct cpufreq_policy *policy)
 	pr_debug("%s: throttle threshold = %u [ns]\n",
 		  __func__, gd->throttle_nsec);
 
+	policy->governor_data = gd;
+
 	if (cpufreq_driver_is_slow()) {
 		cpufreq_driver_slow = true;
 		gd->task = kthread_create(cpufreq_sched_thread, policy,
@@ -281,7 +283,6 @@ static int cpufreq_sched_policy_init(struct cpufreq_policy *policy)
 		init_irq_work(&gd->irq_work, cpufreq_sched_irq_work);
 	}
 
-	policy->governor_data = gd;
 	set_sched_freq();
 
 	return 0;
-- 
1.9.1

[toc] | [next] | [standalone]


#1339342 — Re: [Eas-dev] [PATCH] cpufreq_sched: set governor_data before waking up kschedfreq

FromJuri Lelli <juri.lelli@arm.com>
Date2016-02-22 12:00 +0100
SubjectRe: [Eas-dev] [PATCH] cpufreq_sched: set governor_data before waking up kschedfreq
Message-ID<r4WnE-4v7-23@gated-at.bofh.it>
In reply to#1338702
Hi,

On 20/02/16 19:32, Pingbo Wen wrote:
> Fix null pointer dereference error liked below. This BUG can be easily
> re-produced by 'monkey --throttle 50' in android 6.0.
> 

I'm not sure which code base you are looking at here, but I think this
problem has already been noticed and fixed by Ricky. Thanks for sharing
your fix, though.

However, I'm afraid that eas-dev might be not open, so please don't
cross post in the future.

Best,

- Juri

[toc] | [prev] | [next] | [standalone]


#1339406 — Re: [Eas-dev] [PATCH] cpufreq_sched: set governor_data before waking up kschedfreq

FromPingbo Wen <pingbo.wen@linaro.org>
Date2016-02-22 12:40 +0100
SubjectRe: [Eas-dev] [PATCH] cpufreq_sched: set governor_data before waking up kschedfreq
Message-ID<r4X0m-58j-35@gated-at.bofh.it>
In reply to#1339342
Hi, Juri

On Monday, February 22, 2016 06:53 PM, Juri Lelli wrote:
> Hi,
> 
> On 20/02/16 19:32, Pingbo Wen wrote:
>> Fix null pointer dereference error liked below. This BUG can be easily
>> re-produced by 'monkey --throttle 50' in android 6.0.
>>
> 
> I'm not sure which code base you are looking at here, but I think this
> problem has already been noticed and fixed by Ricky. Thanks for sharing
> your fix, though.

I pulled git://linux-arm.org/linux-power.git origin/energy_model_rfc_v5.2,
but didn't get any new commits about this bug. Where can I find the latest
branch?

Pingbo

[toc] | [prev] | [next] | [standalone]


#1339407 — Re: [Eas-dev] [PATCH] cpufreq_sched: set governor_data before waking up kschedfreq

FromJuri Lelli <juri.lelli@arm.com>
Date2016-02-22 12:50 +0100
SubjectRe: [Eas-dev] [PATCH] cpufreq_sched: set governor_data before waking up kschedfreq
Message-ID<r4Xa1-5ds-1@gated-at.bofh.it>
In reply to#1339406
On 22/02/16 19:32, Pingbo Wen wrote:
> Hi, Juri
> 
> On Monday, February 22, 2016 06:53 PM, Juri Lelli wrote:
> > Hi,
> > 
> > On 20/02/16 19:32, Pingbo Wen wrote:
> >> Fix null pointer dereference error liked below. This BUG can be easily
> >> re-produced by 'monkey --throttle 50' in android 6.0.
> >>
> > 
> > I'm not sure which code base you are looking at here, but I think this
> > problem has already been noticed and fixed by Ricky. Thanks for sharing
> > your fix, though.
> 
> I pulled git://linux-arm.org/linux-power.git origin/energy_model_rfc_v5.2,
> but didn't get any new commits about this bug. Where can I find the latest
> branch?
> 

The fix is not yet present in any branch, but I think it has been
already discussed in Steve's last RFC. I guess it will be incorporated
in his next version.

Best,

- Juri

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web