linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "libaokun (A)" <libaokun1@huawei.com>
To: <richard@nod.at>, <dwmw2@infradead.org>,
	<linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Cc: <yukuai3@huawei.com>, Baokun Li <libaokun1@huawei.com>
Subject: Re: [PATCH -next v3 0/2] jffs2: fix two memory leak when mount jffs2
Date: Thu, 10 Mar 2022 16:34:35 +0800	[thread overview]
Message-ID: <c0d05cca-2827-481c-f534-d4fb30b91533@huawei.com> (raw)
In-Reply-To: <20220114102854.3399585-1-libaokun1@huawei.com>

A gentle ping, sorry for the noise.

在 2022/1/14 18:28, Baokun Li 写道:
> V1->V2:
> 	In jffs2_scan_medium,
> 	if s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
> 	returns error, go to "out" to do clear. Null pointer dereference
> 	occurs when if (s->sum_list_head) is executed in "out".
>
> V2->V3:
> 	Sorry for the noise, but there seems to be a more elegant way to
> 	fix the memory leak in jffs2_scan_medium. When memory allocation
> 	fails or CONFIG_JFFS2_SUMMARY is N, s is NULL.For the former case,
> 	add the new tag "out_buf" to avoid it.In the latter case,
> 	jffs2_sum_reset_collected is also an empty function and does nothing.
>
> Baokun Li (2):
>    jffs2: fix memory leak in jffs2_do_mount_fs
>    jffs2: fix memory leak in jffs2_scan_medium
>
>   fs/jffs2/build.c | 4 +++-
>   fs/jffs2/scan.c  | 6 ++++--
>   2 files changed, 7 insertions(+), 3 deletions(-)
>
-- 
With Best Regards,
Baokun Li


  parent reply	other threads:[~2022-03-10  8:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 10:28 [PATCH -next v3 0/2] jffs2: fix two memory leak when mount jffs2 Baokun Li
2022-01-14 10:28 ` [PATCH -next v3 1/2] jffs2: fix memory leak in jffs2_do_mount_fs Baokun Li
2022-01-14 10:28 ` [PATCH -next v3 2/2] jffs2: fix memory leak in jffs2_scan_medium Baokun Li
2022-02-18  6:14 ` [PATCH -next v3 0/2] jffs2: fix two memory leak when mount jffs2 libaokun (A)
2022-03-10  8:34 ` libaokun (A) [this message]
2022-03-16 22:00   ` Richard Weinberger
2022-03-17  1:39     ` libaokun (A)

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=c0d05cca-2827-481c-f534-d4fb30b91533@huawei.com \
    --to=libaokun1@huawei.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=yukuai3@huawei.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).