Skip to contentSkip to conversation

trivial: initialize root cgroup's sibling list

PATCH In review Glauber Costa 2 participants 3 messages Sep 23, 2011 – Sep 29, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trivial: initialize root cgroup's sibling list

Even though there are no siblings, the list should be initialized not to contain bogus values.

---
 kernel/sched.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
kernel/sched.c +1 -0
index ccacdbd..3ed4107 100644
@@ -8082,6 +8082,7 @@ void __init sched_init(void)
 #ifdef CONFIG_CGROUP_SCHED
 	list_add(&root_task_group.list, &task_groups);
 	INIT_LIST_HEAD(&root_task_group.children);
+	INIT_LIST_HEAD(&root_task_group.siblings);
 	autogroup_init(&init_task);
 #endif /* CONFIG_CGROUP_SCHED */
 
Signature · 1 line
1.7.6
#1 lore raw
Quoted 13 lines · Glauber Costa

Even though there are no siblings, the list should be initialized not to contain bogus values.

---
  kernel/sched.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
kernel/sched.c +0 -0
index ccacdbd..3ed4107 100644

kernel/sched.c void __init sched_init(void) · line 8088

Quoted 7 lines
kernel/sched.c +1 -0
@@ -8082,6 +8082,7 @@ void __init sched_init(void)
  #ifdef CONFIG_CGROUP_SCHED
  	list_add(&root_task_group.list,&task_groups);
  	INIT_LIST_HEAD(&root_task_group.children);
+	INIT_LIST_HEAD(&root_task_group.siblings);
  	autogroup_init(&init_task);
  #endif /* CONFIG_CGROUP_SCHED */
 

Peter, how about this one ?

Acked-by on v1 1/1
#2 lore raw
In reply to Glauber Costa
Quoted 4 lines · Glauber Costa

Even though there are no siblings, the list should be initialized not to contain bogus values.

Thanks,
Paul

Quoted 20 lines

---
 kernel/sched.c |    1 +

 1 files changed, 1 insertions(+), 0 deletions(-)
kernel/sched.c +1 -1
index ccacdbd..3ed4107 100644
@@ -8082,6 +8082,7 @@ void __init sched_init(void)
  #ifdef CONFIG_CGROUP_SCHED
        list_add(&root_task_group.list, &task_groups);
        INIT_LIST_HEAD(&root_task_group.children);
+       INIT_LIST_HEAD(&root_task_group.siblings);
        autogroup_init(&init_task);
  #endif /* CONFIG_CGROUP_SCHED */
 
--

1.7.6