Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1338702
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Pingbo Wen <pingbo.wen@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] cpufreq_sched: set governor_data before waking up kschedfreq |
| Date | Sat, 20 Feb 2016 12:40:04 +0100 |
| Message-ID | <r4e3i-4EY-59@gated-at.bofh.it> (permalink) |
| X-Original-To | eas-dev@lists.linaro.org |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=UwjFG9z8xx3gc/zypxyvb+4LRxyWaf5DKjhOrcKolhE=; b=fV9pvbtoJWpPam+k6yPs1J8WSa7Bw692LtbJRhwjxGljm67m88hVjs2SSeziPHRfqG KULRbnrw88s+y9ovbDkb8ci0SsR226TnTSdgRUlAmpn7N5YsgWeKoIdv29rn95cECXOC Sz5JdV8ncmdBy1TuBFB7KfZp3QvP7JIyLnqts= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UwjFG9z8xx3gc/zypxyvb+4LRxyWaf5DKjhOrcKolhE=; b=hfo8xjY/O2/QElVBicU+thuMs7FGt1/Jq5h2Mbd3ucopDUjYT3FiUw/nZI2EEjHDsb IqyFgW4KL2Q23ayxVQ7JwcFTwrLkAasypTAxGJ+FaPMTuQbQzWFPR1IuuAoTnOjULdTc Gp0Aj1rLBznWv68dJ4Lzji0t4rhvnW7aWejAH5PqB9fwNvquwK08vdZt809yps7zBChL /g2XGTrTRhC4CoPvdzoUp4/2KIRMUTLQ0YWqFLUzjbP96jiy9vIEml6dVq4j+JqPl/6Q roXZk5KhywSC3v5/zXyGrchKPD/8rZEum1fsdxELDFwAjeNskEra5BUOBR25tXZXknND eNyQ== |
| X-Gm-Message-State | AG10YOT5preo9PGukYogRKYjeRZAn+pLpW++2jS+6JosFQe+3ydWO3ZE/h7vjXtYH88bKI7N |
| X-Received | by 10.98.87.142 with SMTP id i14mr24501369pfj.63.1455968002761; Sat, 20 Feb 2016 03:33:22 -0800 (PST) |
| X-Mailer | git-send-email 1.9.1 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 48 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | mturquette@baylibre.com, smuckle@linaro.org, linux-kernel@vger.kernel.org, Pingbo Wen <pingbo.wen@linaro.org> |
| X-Original-Date | Sat, 20 Feb 2016 19:32:46 +0800 |
| X-Original-Message-ID | <1455967966-11911-1-git-send-email-pingbo.wen@linaro.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1338702 |
Show key headers only | View raw
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[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
csiph-web