Received: by 10.213.65.68 with SMTP id h4csp163563imn; Fri, 30 Mar 2018 03:09:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Y8MnGKmZ+5YS2gT2PdHuXOZr+ep7v3Z9IsYRzZX6ErrfWI6ic2iyeryE6aEvOJ4FXWUT0 X-Received: by 2002:a17:902:2941:: with SMTP id g59-v6mr5540444plb.55.1522404584239; Fri, 30 Mar 2018 03:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522404584; cv=none; d=google.com; s=arc-20160816; b=OuSe6j4ie1H6KeHsDik/Q1vpQoWWyc6uFG6pOLM1jyu0PkapInLaUhNA8vupqTSZ/w ffkTP1DO5H39OyEBGI3PsC3snM+6IfSQXtoPpHu9pm6sORdh8DAYKeGhPrvvKKXVanJm tgl1s+seDCdwIEveWKYsY+coxUgJh7fv6LeCByB2I1wHts3qDevbahX3q297EtEmYPpH weZymBRKQR2ELyHaCeOHUhmKs6eFevVch72oXra2jGf62Q3jbCY5B6gp50+lh1NImJwN cmctEjRl7hcJB9/F4xBPcGN8RETRw+BNynOHliGX/TqIcTqhWHBi9YVI1wN+S6Cp9QtS xjbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=IATCxaJ/7tgQsKqmhx3RJ/msO/Jpikpa/QG5wVG9AAE=; b=tsHP4FTwLqCXqk5WYR5ASxdGaujAcYVonOrk5OEtLumNCtopWCTMQrHu1G7GwlrDXi knoU9nv5lqf90hOXZMM6mL6xDlA2bZc4FtkKP4+HZmWhYAbHJGN1p1zlEnyH7vjsdzgq 6QYZkgSlhWVjXkdZ7kk4+7N5J2IiHLSzgC64O3RbiybLOeToBIQtGj9+gI7EgH3BduEu /iQAumwljZr6va2MK0Ml49iZTmxYpUGU7ergktRrci1LqmnIrBSqFp5rJ9f7ahMM5R8u jILonoI8SL7WeKkyVvh9EAwo7MIhqP+OQiZPv8cO3+TwnnwBWR3m9VSQCGU/81qb/Iyw TnXA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5si5526677pgo.144.2018.03.30.03.09.30; Fri, 30 Mar 2018 03:09:44 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751277AbeC3KHz (ORCPT + 99 others); Fri, 30 Mar 2018 06:07:55 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:42844 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbeC3KHx (ORCPT ); Fri, 30 Mar 2018 06:07:53 -0400 Received: from 79.184.254.228.ipv4.supernova.orange.pl (79.184.254.228) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id 220cdc4f60626f24; Fri, 30 Mar 2018 12:07:52 +0200 From: "Rafael J. Wysocki" To: Lenny Szubowicz Cc: lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ACPI: acpi_pad: Fix memory leak in power saving threads Date: Fri, 30 Mar 2018 12:08:10 +0200 Message-ID: <2044415.8uv91vuFCW@aspire.rjw.lan> In-Reply-To: <1522159000-7778-1-git-send-email-lszubowi@redhat.com> References: <1522159000-7778-1-git-send-email-lszubowi@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, March 27, 2018 3:56:40 PM CEST Lenny Szubowicz wrote: > Fix once per second (round_robin_time) memory leak of about 1 KB in > each acpi_pad kernel idling thread that is activated. > > Found by testing with kmemleak. > > Signed-off-by: Lenny Szubowicz > --- > drivers/acpi/acpi_pad.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c > index 7544310..552c1f7 100644 > --- a/drivers/acpi/acpi_pad.c > +++ b/drivers/acpi/acpi_pad.c > @@ -110,6 +110,7 @@ static void round_robin_cpu(unsigned int tsk_index) > cpumask_andnot(tmp, cpu_online_mask, pad_busy_cpus); > if (cpumask_empty(tmp)) { > mutex_unlock(&round_robin_lock); > + free_cpumask_var(tmp); > return; > } > for_each_cpu(cpu, tmp) { > @@ -127,6 +128,8 @@ static void round_robin_cpu(unsigned int tsk_index) > mutex_unlock(&round_robin_lock); > > set_cpus_allowed_ptr(current, cpumask_of(preferred_cpu)); > + > + free_cpumask_var(tmp); > } > > static void exit_round_robin(unsigned int tsk_index) > Applied, thanks!