Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp145214ybg; Tue, 2 Jun 2020 19:19:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqBySY/kZbPOd7RWoX98wGrwJK6NAJhU/A5UgFFukq9Y117yxw4K6/c943yAKIFpn/oetQ X-Received: by 2002:a17:906:90d4:: with SMTP id v20mr9933083ejw.471.1591150777537; Tue, 02 Jun 2020 19:19:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591150777; cv=none; d=google.com; s=arc-20160816; b=PjBwT7lAi9hymM7PEQBwVVaGmos6V4QkgGx3I0FWJ2W8qy/Tp/fh8d3T49zA7D3vOS uhPrEs1lj9ze6OORstTHFM6wikWut6kdMQo3+X00HRQy/JxG/flZuqSRe0u3ekqXZzR6 2Yvr1do3h6Vg4RE8pzXE/VLwnu/AjAA0wLUN/nyVBJ8pdsl/DVJ/YkoNLUg4fMbDF1ES G7p/XRzJyD2mYjRQM1PdjQPsxvyFx/Vzf4m8JLeQn4bwFbsqC/94PMPxPjbdcdvBiGLP iYsSC7AoJhphANu5MT28V5vE/nimPpb7l94k66rMApB9znA9rVVbyFAmKiwFQSdTrPBO VnTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-language:thread-index:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:cc:to:from :dkim-signature:dkim-filter; bh=bME66dlOtQH0kCIkca74ydV/mIVf+pc4dS66rCLdntM=; b=oVLyI7DQ3eUNfyXIm4gz9Xckf6OAxjJjIY2u227c8e1gtTLB51Z0hj1fSu8J78Bw0I rdInN6E5AMs7V4+0vyMpl68NsvaocAdKmGham1SfrCaLLvZpmayiaaa8q0+itLC+kXtT qXMcJzUxTWL+dNaOmMhsM2FrPNUN3Qr/9cfK7HUMBarVcyRa2sjuiteX21IfeH02E/LG vAvO5agp6ZuDA3hAO/u7OIAYTKJjYrIsEEpCqW9yyzbQk3WqzSahp994/LSlhogvwNgq UFNFZifrv8Yx7Kqj+Ii1AllB/0/3WhmvhRag6qJpGFm3tetQ/0pqe/nFdiyZSeMwoXQo kiHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=sep8wLwJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o18si360779ejr.423.2020.06.02.19.19.13; Tue, 02 Jun 2020 19:19:37 -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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=sep8wLwJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725881AbgFCCQb (ORCPT + 99 others); Tue, 2 Jun 2020 22:16:31 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:14770 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbgFCCQ3 (ORCPT ); Tue, 2 Jun 2020 22:16:29 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20200603021626epoutp03d8ce3b9cef382c33c92f74fe53dc8c42~U5wdFwnaj0138701387epoutp03b for ; Wed, 3 Jun 2020 02:16:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20200603021626epoutp03d8ce3b9cef382c33c92f74fe53dc8c42~U5wdFwnaj0138701387epoutp03b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1591150586; bh=bME66dlOtQH0kCIkca74ydV/mIVf+pc4dS66rCLdntM=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=sep8wLwJEUqW+EQlKiaqL1y1VWArw7hWeBv9XtzS+13HMxxiA1n3i9zKQve+38S9d fnTJjEULSUsxY34cR23pJg8hUVCnSOHSN1yl/dnmSR1cnfGuWe5dQ/lZEqWdjvmvq/ uwTpqsGd3RH49vzbHvUimpO5sUrPSfp6ttL+uh7s= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20200603021626epcas1p2fe69e3ba066c56157785f5fe0ce125ea~U5wcqGusS1285112851epcas1p2s; Wed, 3 Jun 2020 02:16:26 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.40.160]) by epsnrtp2.localdomain (Postfix) with ESMTP id 49cCFh4SS9zMqYkX; Wed, 3 Jun 2020 02:16:24 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id D9.BF.18978.7F707DE5; Wed, 3 Jun 2020 11:16:23 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200603021623epcas1p2dc700151a39d0315b1cc4158287ecf99~U5wZ18UnG1287212872epcas1p2e; Wed, 3 Jun 2020 02:16:23 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200603021623epsmtrp1d527b3372964f3120f343c85793df63a~U5wZ1R-mW0421804218epsmtrp1d; Wed, 3 Jun 2020 02:16:23 +0000 (GMT) X-AuditID: b6c32a35-5edff70000004a22-d8-5ed707f74f41 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 50.A9.08382.7F707DE5; Wed, 3 Jun 2020 11:16:23 +0900 (KST) Received: from namjaejeon01 (unknown [10.88.104.63]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200603021623epsmtip2344435f7960b49d0073ea4253b0345eb~U5wZrFTNK1151211512epsmtip2o; Wed, 3 Jun 2020 02:16:23 +0000 (GMT) From: "Namjae Jeon" To: "'Al Viro'" Cc: , , , , , In-Reply-To: <20200603015808.GS23230@ZenIV.linux.org.uk> Subject: RE: [PATCH] exfat: fix memory leak in exfat_parse_param() Date: Wed, 3 Jun 2020 11:16:23 +0900 Message-ID: <015501d6394c$fa4aeb80$eee0c280$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHbISVtbnT/hIiybKuhVppdlkZmogJhygbYAe6wsq2omdNeMA== Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOJsWRmVeSWpSXmKPExsWy7bCmvu539utxBm9eKVjMWTWFzWLP3pMs Fpd3zWGz2PLvCKvFgo2PGC2OvOlmtjj/9zirA7vHzll32T32TDzJ5tG3ZRWjx+dNch6bnrxl CmCNyrHJSE1MSS1SSM1Lzk/JzEu3VfIOjneONzUzMNQ1tLQwV1LIS8xNtVVy8QnQdcvMATpD SaEsMacUKBSQWFyspG9nU5RfWpKqkJFfXGKrlFqQklNgaFCgV5yYW1yal66XnJ9rZWhgYGQK VJmQk/F6ykbWglcsFU+XNLI2MH5j7mLk5JAQMJGY9GYakM3FISSwg1FiWnMbK0hCSOATo8Si SVCJb4wS+xZ9h+s49uEoE0RiL6NE35/r7BDOS0aJCe93s4BUsQnoSvz7s58NxBYR0JT4P3cC 2Chmge2MEp8WTwAq4uDgFLCQaH7mB1IjLOAksfT7ZXYQm0VAReL0laOMIDavgKXEoUkdzBC2 oMTJmU/A5jMLyEtsfzsH6iIFiZ9Pl7FC7H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lAJnEKWEg0P/MDaRAWcJJY+v0y2CAWARWJ01eOMoLYvAKW EocmdTBD2IISJ2c+AWtlFtCTaNsIVsIsIC+x/e0cqAcUJH4+XcYKcYOTxKtbz1ghakQkZne2 MU9gFJ6FZNIshEmzkEyahaRjASPLKkbJ1ILi3PTcYsMCw7zUcr3ixNzi0rx0veT83E2M4FjS 0tzBuH3VB71DjEwcjIcYJTiYlUR4rWSvxQnxpiRWVqUW5ccXleakFh9ilOZgURLnvVG4ME5I ID2xJDU7NbUgtQgmy8TBKdXAlPJSuLfM/euJ5mmGP71feHCt+VP35e1mVhmLaS87pyQyiXaV RfAXT7hwMPetSVv6EzH9gNDyF7Zci0O/m9yMecYg1Lf7aACXPCOD/80cvYwuiS3mjcovHSXy th0pdOW7vr/JqWXjpUr2nPp9Bk9FQ0P1T3vuNmZtPXJ4MWueYTPT/j2e9TzFDJufz1dcf6zm bkm2647JTn4RcXp/br4w+eTM7tcTJKuVIXSf77ZdTGrDCnPP+seRLrVuvub1y/4dreqNWDBl 0jKF3QckT2+o33tG72Ozo332+ntlIrvSV1m8ebvXaPLDgyVOE3zKH1nsMH/+mW/vPf6DJwpE pnlxfNmpwBH2erLKysIPvCxKLMUZiYZazEXFiQAL1PK7FAMAAA== X-CMS-MailID: 20200603021623epcas1p2dc700151a39d0315b1cc4158287ecf99 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200603013447epcas1p45c6537dab8fee50f1f5b8fe7fd21da2b References: <20200603012957.9200-1-namjae.jeon@samsung.com> <20200603015808.GS23230@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Wed, Jun 03, 2020 at 10:29:57AM +0900, Namjae Jeon wrote: > > > exfat_free() should call exfat_free_iocharset() after stealing > > param->string instead of kstrdup in exfat_parse_param(). > > ITYM > extfat_free() should call exfat_free_iocharset(), to prevent a leak in case we fail after > parsing iocharset= but before calling > get_tree_bdev() > > Additionally, there's no point copying param->string in > exfat_parse_param() - just steal it, leaving NULL in param->string. > That's independent from the leak or fix thereof - it's simply avoiding an extra copy. Updated it in v2. Thanks!