Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5072384pxj; Wed, 26 May 2021 02:04:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLTu3XBodjdUvUcyXmSRMGEfEF9WBPLCG8mhMM0rkmyZK2GyxD0l2+XSHj63Mk0FWajOR8 X-Received: by 2002:aa7:df11:: with SMTP id c17mr36604291edy.317.1622019862687; Wed, 26 May 2021 02:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622019862; cv=none; d=google.com; s=arc-20160816; b=hof5/UAgnFttyw3xrCetq5W+0m7Q6B+W82ea61oh0ChwbaYwVMYTDWhvSo7xuLCICQ ovhup6gbgKqFm+TRBlB0Q0kF/xFcHvvtEuTJCGhOYMNBq8vhloVQPo/Uk5wXpecrxTqv wc2+nz74e2vdyu17vKotIloQnapGCMELgeCfzUxnm/OlhnZM9IKIXPcUzGn9WGACh4TL Rnrp5QkpTz9lf+/XB4/1fwPq5XIPL4gccBNTkit7x7NrWxW+1iZm0PSWYUXyj89z9rkZ D93Q/GHpG2E+6ZvSvUMy44UnbxT6gwW6HRdlCnqAbHWzqbG70twPKzACeyQhccKlY3qD E3Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=rWC/XI24pKgxW/rh9hmVBbc1staCUMlm4IuesdM3/r4=; b=aEikfEpR5wPMgEKz0fXkIz7aFdZE/RHinrNAZCmBgRc9OtCF1JMyllhIyVayI/eQB0 9Y5tE/YrUmyzYTVAp3c0xOt8n/zJ4SVkekhS0jj341kir2IIwQiJ/J69u+0yMTInXd9v X7wSJfPR1IYPr+QnTSWqT4bDE1WFEgCcCQlXFM26t9bz27VoGDd4QaUrjGJzSEck7jgD HR5OCnoB5DAqJDhzLVB4iBMVerpEBRE3GmvE+hTxEjt+PRyuOsAmF7fYKNB9yyMnOAlY gk6sIepNWhzBraIvMxSrR6brVxw7JPsiHWBHebtcIv0kAPV/wI6X0qWlg+QQWyNaljyy 7i9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i2si20651848ejp.119.2021.05.26.02.03.53; Wed, 26 May 2021 02:04:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233436AbhEZJEP (ORCPT + 99 others); Wed, 26 May 2021 05:04:15 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:60517 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233501AbhEZJEM (ORCPT ); Wed, 26 May 2021 05:04:12 -0400 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id F096AC000C; Wed, 26 May 2021 09:02:37 +0000 (UTC) From: Miquel Raynal To: Ansuel Smith , Andy Gross , Bjorn Andersson , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mtd: parsers: qcom: Fix leaking of partition name Date: Wed, 26 May 2021 11:02:37 +0200 Message-Id: <20210526090237.180505-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210525230931.30013-1-ansuelsmth@gmail.com> References: MIME-Version: 1.0 X-linux-mtd-patch-notification: thanks X-linux-mtd-patch-commit: b'10f3b4d79958d6f9f71588c6fa862159c83fa80f' Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-05-25 at 23:09:31 UTC, Ansuel Smith wrote: > Add cleanup function as the name variable for the partition name was > allocaed but never freed after the use as the add mtd function > duplicate the name and free the pparts struct as the partition name is > assumed to be static. > The leak was found using kmemleak. > > Fixes: 803eb124e1a6 ("mtd: parsers: Add Qcom SMEM parser") > Signed-off-by: Ansuel Smith > Reviewed-by: Bjorn Andersson > Reviewed-by: Manivannan Sadhasivam Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks. Miquel