]> git.karo-electronics.de Git - linux-beck.git/commitdiff
schedcore: Remove duplicated init_task's preempt_notifiers init
authorseokhoon.yoon <iamyooon@gmail.com>
Tue, 16 Aug 2016 09:26:08 +0000 (18:26 +0900)
committerIngo Molnar <mingo@kernel.org>
Mon, 5 Sep 2016 11:29:44 +0000 (13:29 +0200)
init_task's preempt_notifiers is initialized twice:

1) sched_init()
   -> INIT_HLIST_HEAD(&init_task.preempt_notifiers)

2) sched_init()
   -> init_idle(current,) <--- current task is init_task at this time
    -> __sched_fork(,current)
     -> INIT_HLIST_HEAD(&p->preempt_notifiers)

I think the first one is unnecessary, so remove it.

Signed-off-by: seokhoon.yoon <iamyooon@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1471339568-5790-1-git-send-email-iamyooon@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c

index 7d602f508ca16d5088a642ab97292c10cf2c4b37..90b1961f6ea5ce8a486976dd51052930ff19a49e 100644 (file)
@@ -7554,10 +7554,6 @@ void __init sched_init(void)
 
        set_load_weight(&init_task);
 
-#ifdef CONFIG_PREEMPT_NOTIFIERS
-       INIT_HLIST_HEAD(&init_task.preempt_notifiers);
-#endif
-
        /*
         * The boot idle thread does lazy MMU switching as well:
         */