[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-4b12db939166042eb78e592bdf94ef113c14e379@git.kernel.org>
Date: Mon, 30 Jan 2017 03:56:30 -0800
From: tip-bot for Mathieu Poirier <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, tglx@...utronix.de, mingo@...nel.org,
mathieu.poirier@...aro.org, torvalds@...ux-foundation.org,
linux-kernel@...r.kernel.org, efault@....de, peterz@...radead.org
Subject: [tip:sched/core] sched/core: Fix &rd->cpudl memory leak
Commit-ID: 4b12db939166042eb78e592bdf94ef113c14e379
Gitweb: http://git.kernel.org/tip/4b12db939166042eb78e592bdf94ef113c14e379
Author: Mathieu Poirier <mathieu.poirier@...aro.org>
AuthorDate: Tue, 24 Jan 2017 14:11:35 -0700
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 30 Jan 2017 11:46:37 +0100
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@...aro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1485292295-21298-2-git-send-email-mathieu.poirier@linaro.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/sched/core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 17d1df6..d01f9d0 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -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:
Powered by blists - more mailing lists