Skip to content
Commit 99bc5242 authored by Bianca Lutz's avatar Bianca Lutz Committed by Ingo Molnar
Browse files

sched: Do not attempt to destroy uninitialized rt_bandwidth



If a task group is to be created and alloc_fair_sched_group() fails,
then the rt_bandwidth of the corresponding task group is not yet
initialized. The caller, sched_create_group(), starts a clean up
procedure which calls free_rt_sched_group() which unconditionally
destroys the not yet initialized rt_bandwidth.

This crashes or hangs the system in lock_hrtimer_base(): UP systems
dereference a NULL pointer, while SMP systems loop endlessly on a
condition that cannot become true.

This patch simply avoids the destruction of rt_bandwidth when the
initialization code path was not reached.

(This was discovered by accident with a custom kernel modification.)

Signed-off-by: default avatarBianca Lutz <sowilo@cs.tu-berlin.de>
Signed-off-by: default avatarJan Schoenherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1310580816-10861-7-git-send-email-schnhrr@cs.tu-berlin.de
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 045176d2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment