From patchwork Tue Jan 24 21:11:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 92397 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1915917qgi; Tue, 24 Jan 2017 13:11:42 -0800 (PST) X-Received: by 10.99.131.65 with SMTP id h62mr42149101pge.41.1485292302677; Tue, 24 Jan 2017 13:11:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x23si20692216pfa.140.2017.01.24.13.11.40; Tue, 24 Jan 2017 13:11:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750952AbdAXVLj (ORCPT + 25 others); Tue, 24 Jan 2017 16:11:39 -0500 Received: from mail-it0-f54.google.com ([209.85.214.54]:36211 "EHLO mail-it0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750807AbdAXVLi (ORCPT ); Tue, 24 Jan 2017 16:11:38 -0500 Received: by mail-it0-f54.google.com with SMTP id c7so95033233itd.1 for ; Tue, 24 Jan 2017 13:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=wZSZHQXSvM8a807x3/X3x0JDP0K3cVPpQ+vWgyPYlng=; b=h09ZdLpFsT3YxKyiQnOIO8EuId/BilDWEay165PtS/L34hZGEh+t8gTCkFOxFClTRI kRxZs4B6YEoxXpCSa3ph7wCXx2kLpmxlT8oMkZ3gbREMH+W7G/pbZQdGiW7htm7LAPmr 1rcLt9Bt2KNQwNVhhyZVO9Asn5jR35wPNJ9i0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wZSZHQXSvM8a807x3/X3x0JDP0K3cVPpQ+vWgyPYlng=; b=L/g9K2nutwU+l2+cZ3nYko2RF/xH0qJQ3dIzknPnVw+wnQ0WwLRp3/D5Ag9cgVdpvm nxqJiVQCLvHTZo6ZPceRu4G576++RwrGqYwS2aiWpcLwGNlkFjATTvoBc71ZJ5nj2xBp dKk/m9KzZ1ei65YN46+rFSTJDBnsePU6BOwa7Slsacygw2967+dSI6XWoyESZUcrIIWy IxU1/nuAwzddMjWUIUhghiAmdhOMH8wWeTEB4OrDLMuZ+4jwRkyAZ+pShJgCx45zUa4i C7iMzHoKConJ4amlEQoOuMlr6VCNPBddxwpctrVQlaNNTYrn9FyHoyx5C+TaXi+KhGna 4s3g== X-Gm-Message-State: AIkVDXISzGmTBgCvmabZzagQuwHqlxf1UME8zo1q5oOdhcsePI7TrR8zTHwcT8IE70qm2g4G X-Received: by 10.36.105.148 with SMTP id e142mr22117666itc.95.1485292297034; Tue, 24 Jan 2017 13:11:37 -0800 (PST) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id k66sm289893itg.8.2017.01.24.13.11.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Jan 2017 13:11:36 -0800 (PST) From: Mathieu Poirier To: mingo@redhat.com, peterz@infradead.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/2] sched/core: Fix &rd->rto_mask memory leak Date: Tue, 24 Jan 2017 14:11:34 -0700 Message-Id: <1485292295-21298-1-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If function cpudl_init() fails the memory allocated for &rd->rto_mask needs to be freed, something this patch is addressing. Signed-off-by: Mathieu Poirier --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/kernel/sched/core.c b/kernel/sched/core.c index c56fb57f2991..5c01ac0f915a 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5881,7 +5881,7 @@ static int init_rootdomain(struct root_domain *rd) init_dl_bw(&rd->dl_bw); if (cpudl_init(&rd->cpudl) != 0) - goto free_dlo_mask; + goto free_rto_mask; if (cpupri_init(&rd->cpupri) != 0) goto free_rto_mask;