From: Markus Elfring <Markus.Elfring@web.de>
To: Navid Emamdoost <navid.emamdoost@gmail.com>,
kernel-janitors@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Anton Vorontsov <anton.vorontsov@linaro.org>,
Colin Cross <ccross@android.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kees Cook <keescook@chromium.org>,
Navid Emamdoost <emamd001@umn.edu>,
Tony Luck <tony.luck@intel.com>
Subject: Re: [PATCH] pstore/ram: Fix memory leak in persistent_ram_new
Date: Fri, 13 Dec 2019 18:08:45 +0100 [thread overview]
Message-ID: <8c374545-b493-3be8-3753-a6fdd574f82c@web.de> (raw)
In-Reply-To: <20191211191353.14385-1-navid.emamdoost@gmail.com>
> In the implementation of persistent_ram_new(), if the allocation for prz
> fails, "label" should be released as part of error handling.
How did you come to this conclusion?
I suggest to reconsider this patch because the mentioned string is passed by
a function parameter.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/pstore/ram_core.c?id=37d4e84f765bb3038ddfeebdc5d1cfd7e1ef688f#n561
https://elixir.bootlin.com/linux/v5.5-rc1/source/fs/pstore/ram_core.c#L561
I recognise other implementation details which could be improved here.
https://lore.kernel.org/lkml/97737d95-d6aa-d24f-1af0-9d4895ceaed2@users.sourceforge.net/
https://lkml.org/lkml/2017/8/16/645
Regards,
Markus
next prev parent reply other threads:[~2019-12-13 20:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 19:13 Navid Emamdoost
2019-12-13 17:08 ` Markus Elfring [this message]
2019-12-30 19:46 ` Kees Cook
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=8c374545-b493-3be8-3753-a6fdd574f82c@web.de \
--to=markus.elfring@web.de \
--cc=anton.vorontsov@linaro.org \
--cc=ccross@android.com \
--cc=emamd001@umn.edu \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=navid.emamdoost@gmail.com \
--cc=tony.luck@intel.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
all inboxes | Powered by JetHome®