mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
sched/core: Fix &rd->cpudl memory leak
While in the process of initialising a root domain, if function cpupri_init() fails the memory allocated in cpudl_init() is not reclaimed. Adding a new goto target to cleanup the previous initialistion of the root_domain's dl_bw structure reclaims said memory. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1485292295-21298-2-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
92c99ac829
commit
4b12db9391
1 changed files with 3 additions and 1 deletions
|
@ -5979,9 +5979,11 @@ static int init_rootdomain(struct root_domain *rd)
|
|||
goto free_rto_mask;
|
||||
|
||||
if (cpupri_init(&rd->cpupri) != 0)
|
||||
goto free_rto_mask;
|
||||
goto free_cpudl;
|
||||
return 0;
|
||||
|
||||
free_cpudl:
|
||||
cpudl_cleanup(&rd->cpudl);
|
||||
free_rto_mask:
|
||||
free_cpumask_var(rd->rto_mask);
|
||||
free_dlo_mask:
|
||||
|
|
Loading…
Reference in a new issue