lkml.org 
[lkml]   [2014]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [sched] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
On Sat, 11 Oct 2014 13:15:30 +0800
Fengguang Wu <fengguang.wu@intel.com> wrote:

> FYI, we noticed the below changes on commit
>
> 445d95d7c384741d133251a9adac935866591c92 ("sched: Remove update_rq_runnable_avg")
>
> [ 67.303839] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040
> [ 67.304014] IP: [<ffffffff810b1d52>] print_cfs_rq+0x4a3/0xa96

Well that one's pretty obvious:


--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -68,14 +68,6 @@ static void print_cfs_group_stats(struct seq_file *m, int cpu, struct task_group
#define PN(F) \
SEQ_printf(m, " .%-30s: %lld.%06ld\n", #F, SPLIT_NS((long long)F))

- if (!se) {
- struct sched_avg *avg = &cpu_rq(cpu)->avg;
- P(avg->runnable_avg_sum);
- P(avg->runnable_avg_period);
- return;
- }
-
-
PN(se->exec_start);
PN(se->vruntime);
PN(se->sum_exec_runtime);

You can remove the P() calls from that if statement, but you can't
remove the whole thing because you will try to dereference a NULL se
immediately afterward if you do.


\
 
 \ /
  Last update: 2014-10-11 08:42    [W:0.030 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site