From: Al Viro <viro@zeniv.linux.org.uk>
To: Namjae Jeon <namjae.jeon@samsung.com>
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 02:58:08 +0100 [thread overview]
Message-ID: <20200603015808.GS23230@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20200603012957.9200-1-namjae.jeon@samsung.com>
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.
next prev parent reply other threads:[~2020-06-03 1:58 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 [this message]
2020-06-03 2:16 ` Namjae Jeon
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=20200603015808.GS23230@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=butterflyhuangxx@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.com \
--cc=sj1557.seo@samsung.com \
--cc=stable@vger.kernel.org \
--cc=syzkaller@googlegroups.com \
/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;
as well as URLs for NNTP newsgroup(s).