Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2453763lqb; Mon, 27 May 2024 23:22:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXhxvijVrdJlpolLcAIp2qlhvIFlMOz1UyRklyypcAO6CXhgutCq0a3r+ZwBnEkT0L9pf6YSnxXGJIbvBgTIUgv67jxrmNpMkQcJVhFGg== X-Google-Smtp-Source: AGHT+IHMUjnVB1ulL89JnRSTtr/AjGFJnJ4lY9qMAOu9n30jHmdFg0ZqlwKpaNfAjb7QzrSFdGVq X-Received: by 2002:a17:902:ce86:b0:1e7:b6f4:2d75 with SMTP id d9443c01a7336-1f4486b95e4mr128978775ad.6.1716877350743; Mon, 27 May 2024 23:22:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716877350; cv=pass; d=google.com; s=arc-20160816; b=y+vlrGksi5Z24zpqLifIwvnUL4AMoFNRbn9G82nyOcyy1HKMq0dOoXlXendGqAaJ6t yaQuC+jigRnBE1B5J2r5NAslO2YlumGl4RFlfEuTxq1GF7f1HBfM7wDdHZJ1vgObtkhf itEpki9cVeVpZu5IlXXmA7wU25miRTuPhkQibmd0KuAhu58fBY5rNs4dIx2B51bzfaHx QTkSj69u5w9l059s3F7pNe34gkKlbP0PvrYwbtkkd3gUa8s7DDvp4kC8w6SaIFUqaxXg OXX92nMF+WfRHtj63qKOwkdcA5ahGyXV293hkLWtpa3H21opxrMSUdcXRXIqkNROxJMN Dotg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=M1CHUr7Pq8GWsvlpUiKUEvnvLu0gU/BSuoJzF8WPCMI=; fh=+nK1FXGEIWjP6IM23e4EG/JoPVA/JxXBZ4GnLZpuhBY=; b=ZWfVVHrAcPv8wEhMC+Zg28Ye1QFF0PM0hbn/5oZNIvuVnzHAN/OcvdLo7hYbBuY6MN LblQ02M+dw7m4F35qJoX+/Up+eYCSturPrTzMXKwqX8nKC3jg45E8ftVsRmIZ3qsX48a vXhl1lLj19kXri/1G9fr2Ing9XziQk4jyZy2Pwz8YiMT0dF3rRAPkqQCPQD3X2CGGUvS a5/Kyc6Dy/4M0+xb2Pw2UMTuxKyVOVYCxa5hgdONbtpx6CZQ0xel48ctmhCuRiHzrQfz INZqeg2FLuuuBuCzeAi1lEcnbocpnT2t4Eu6DTVY4DzFhRdwP0fwEURMIYre1uMz0/g4 VEbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HyHcZ8A9; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-191805-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191805-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c78bf47si73070275ad.28.2024.05.27.23.22.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 23:22:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191805-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HyHcZ8A9; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-191805-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191805-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5BE232836FC for ; Tue, 28 May 2024 06:22:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADCF461FDD; Tue, 28 May 2024 06:22:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HyHcZ8A9" Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE3E9502B9 for ; Tue, 28 May 2024 06:22:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716877340; cv=none; b=K0ycjETamdi2nKbNwndP0g0+796+3jaOrkYwqE7RbiBMjIOA+6hTcMew4+4kjkeXs2Lc+M+PYc5GguDAymeUr4F8DZOH8cjh+BmOH8YLhac+8BKcQc0m3VXGW2a0shrk+Fy4gYciwPWqTr+azYQtUnXhEBaUYGtBvShNc8Co488= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716877340; c=relaxed/simple; bh=sSgwOYRHZt/YbcgLjLwtPsu63K7tgceDCycI1YiPeFA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BUnhT7HNf2n2oriJaLWYhasv4JbzWVIDOQYF6xQ1ohht1bhjE/2NTahARbW4UBKw/oKINdY9EyvPBNOuIcTmAiJWiSGOXx7nikvvCZvn9xkOdrw3ns6ciUXYBkXazwLzsVNr/TH4jbXnpf031Lo9sA26YMTZOKUchDGuk6ytFCY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=HyHcZ8A9; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6f8eba8dcfcso326467b3a.3 for ; Mon, 27 May 2024 23:22:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716877338; x=1717482138; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=M1CHUr7Pq8GWsvlpUiKUEvnvLu0gU/BSuoJzF8WPCMI=; b=HyHcZ8A9w5/AGKJXt1jMLx/6casaWPe08m2+6yPmHRiAmND4w7ZWKrfg7dO6xetrJS inEDHn5KE60ahLfd6lynICBTLpAGyyASxd6FrhD3KxR3ZR3rppIFR5pK2HA20BvnlpEr GZTOsrJMWIPjbxAaGiTqzjv4kPOPFsy3YueA7KZ0/Gr266qwWuOtGuCcRXCuNb9rkVvL 4c+X8dh+n44Ww0BfV1xqTSD9F2fcuPG0DiUkFnfALf4OmHg+RBAhy4yMAhfJDKPpDHpz DpvIDcJI5aFbsUIrXestRykGRcJ/AKv56c4EPoyoqq0THGniy6CfXsYjK3wYdalPO7/1 VdIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716877338; x=1717482138; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=M1CHUr7Pq8GWsvlpUiKUEvnvLu0gU/BSuoJzF8WPCMI=; b=DKY15Nol8I24pgx3MjMsSXB+SePFBpIeZttPEnCajR/Nb9VrqFTO9mNPlo+Hh+/HIl 6IdD5PKwtDewE0icXPkOxCf6FSIkOYZNPXECEKOCCLWrPo9HVvSUHzuqI47o1oq3AhAR ZqJ0zexEpXoOiEtvyg+qvDuwc+HrpxY8LzH+whOLC49plYZZQjHzgxK+DxV46zSMX6LA Rgm7jTfNPYD0x6Mp6RQApNvcCJwCM7YFzSgqLVcpP+cR2FIODiHO+K5ceFw9hUF0uExk xq/5bGEdxf8FyltIn1XvLBXt3yOypGYGMAe6FeMmNOWljJVTwlL87kHonfOrSWln1Zp3 3lqA== X-Forwarded-Encrypted: i=1; AJvYcCV9GuocmHvpKNcEDv8xsHS9L294JoNc7zjS63s3n14ZLPa5HbHChwGXCRy38mNTqtPc9N6jLT5x/yFir6kiNysRdgV1o05wEpnBWIRk X-Gm-Message-State: AOJu0Yxk/mq9RBlxtxaH/qhgai3k1RKNPKRaMdc31RsOZ/ydBRUB97uS 4b8Sgfn9+3VwHz3YDo9Vii4B8frCCpv4hOWJgopXWQipDPOH6bd+KrNMcOuqxtI= X-Received: by 2002:a05:6a00:428e:b0:6f3:1be8:ab68 with SMTP id d2e1a72fcca58-6f8f43c183bmr11831391b3a.32.1716877337935; Mon, 27 May 2024 23:22:17 -0700 (PDT) Received: from localhost ([122.172.82.13]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fbd3ef3esm5802550b3a.32.2024.05.27.23.22.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 23:22:17 -0700 (PDT) Date: Tue, 28 May 2024 11:52:15 +0530 From: Viresh Kumar To: Javier Carrasco Cc: Ilia Lin , "Rafael J. Wysocki" , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 0/2] cpufreq: qcom-nvmem: fix memory leaks and add auto device node cleanup Message-ID: <20240528062215.msu5u6zc2whpqqob@vireshk-i7> References: <20240523-qcom-cpufreq-nvmem_memleak-v1-0-e57795c7afa7@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240523-qcom-cpufreq-nvmem_memleak-v1-0-e57795c7afa7@gmail.com> On 23-05-24, 23:24, Javier Carrasco wrote: > There are a number of error paths in the probe function that do not call > of_node_put() to decrement the np device node refcount, leading to > memory leaks if those errors occur. > > In order to ease backporting, the fix has been divided into two patches: > the first one simply adds the missing calls to of_node_put(), and the > second one adds the __free() macro to the existing device nodes to > remove the need for of_node_put(), ensuring that the same bug will not > arise in the future. > > The issue was found by chance while analyzing the code, and I do not > have the hardware to test it beyond compiling and static analysis tools. > Although the issue is clear and the fix too, if someone wants to > volunteer to test the series with real hardware, it would be great. > > Signed-off-by: Javier Carrasco > --- > Javier Carrasco (2): > cpufreq: qcom-nvmem: fix memory leaks in probe error paths > cpufreq: qcom-nvmem: eliminate uses of of_node_put() Applied. Thanks. -- viresh