From: "Namjae Jeon" <namjae.jeon@samsung.com>
To: "'Al Viro'" <viro@zeniv.linux.org.uk>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<syzkaller@googlegroups.com>, <butterflyhuangxx@gmail.com>,
<sj1557.seo@samsung.com>, <stable@vger.kernel.org>
Subject: RE: [PATCH] exfat: fix memory leak in exfat_parse_param()
Date: Wed, 3 Jun 2020 11:16:23 +0900 [thread overview]
Message-ID: <015501d6394c$fa4aeb80$eee0c280$@samsung.com> (raw)
In-Reply-To: <20200603015808.GS23230@ZenIV.linux.org.uk>
> 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!
prev parent reply other threads:[~2020-06-03 2:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200603013447epcas1p45c6537dab8fee50f1f5b8fe7fd21da2b@epcas1p4.samsung.com>
2020-06-03 1:29 ` [PATCH] exfat: fix memory leak in exfat_parse_param() Namjae Jeon
2020-06-03 1:58 ` Al Viro
2020-06-03 2:16 ` Namjae Jeon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='015501d6394c$fa4aeb80$eee0c280$@samsung.com' \
--to=namjae.jeon@samsung.com \
--cc=butterflyhuangxx@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
--cc=stable@vger.kernel.org \
--cc=syzkaller@googlegroups.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox