linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: zhanchengbin <zhanchengbin1@huawei.com>
Cc: linux-ext4@vger.kernel.org, liuzhiqiang26@huawei.com,
	linfeilong@huawei.com, wubo40@huawei.com
Subject: Re: [PATCH v2 0/6] solve memory leak and check whether NULL pointer
Date: Thu, 12 May 2022 13:14:08 -0400	[thread overview]
Message-ID: <Yn1AYM7rLvRHXNgQ@mit.edu> (raw)
In-Reply-To: <52a2a39d-617f-2f27-a8a4-34da6103e44c@huawei.com>

On Fri, Dec 31, 2021 at 03:40:41PM +0800, zhanchengbin wrote:
> Solve the memory leak of the abnormal branch and the new null pointer check

Applied, but the patches were all white-space damaged so I had to
apply them by hand.  I also reworded the commit description to be
clearer.

The one exception is the patch to lib/ss, which had already been fixed
commit a282671a0 ("libss: fix possible NULL pointer dereference on
allocation failure") in my tree.

Cheers,

                                        - Ted

> Changes from V1:
> ---------------
> - In the V1 of the patch series, have a bug in patch 1/6, when s->s get
>   memory successd, s-len is not assigned a value.
> 
> zhanchengbin (6):
>   e2fsck: set s->len=0 if malloc() fails in alloc_string()
>   lib/ss: check whether argp is null before accessing it in
>     ss_execute_command()
>   lib/support: check whether inump is null before accessing it in
>     quota_set_sb_inum()
>   e2fsprogs: call ext2fs_badblocks_list_free() to free list in exception
>     branch
>   e2fsck: check whether ldesc is null before accessing it in
>     end_problem_latch()
>   lib/ext2fs: call ext2fs_free_mem() to free &io->name in exception
>     branch
> 
>  e2fsck/logfile.c      | 2 +-
>  e2fsck/problem.c      | 2 ++
>  lib/ext2fs/test_io.c  | 2 ++
>  lib/ext2fs/undo_io.c  | 2 ++
>  lib/ss/execute_cmd.c  | 2 ++
>  lib/support/mkquota.c | 3 ++-
>  misc/dumpe2fs.c       | 1 +
>  resize/resize2fs.c    | 4 ++--
>  8 files changed, 14 insertions(+), 4 deletions(-)
> 
> -- 
> 2.27.0

      parent reply	other threads:[~2022-05-12 17:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-31  7:40 [PATCH v2 0/6] solve memory leak and check whether NULL pointer zhanchengbin
2021-12-31  7:41 ` [PATCH v2 1/6] e2fsck: set s->len=0 if malloc() fails in, alloc_string() zhanchengbin
2021-12-31  7:42 ` [PATCH v2 2/6] lib/ss: check whether argp is null before accessing it, in ss_execute_command() zhanchengbin
2021-12-31  7:42 ` [PATCH v2 3/6] lib/support: check whether inump is null before, accessing it in quota_set_sb_inum() zhanchengbin
2021-12-31  7:42 ` [PATCH v2 4/6] e2fsprogs: call ext2fs_badblocks_list_free() to free, list in exception branch zhanchengbin
2021-12-31  7:43 ` [PATCH v2 5/6] e2fsck: check whether ldesc is null before accessing, it in end_problem_latch() zhanchengbin
2021-12-31  7:43 ` [PATCH v2 6/6] lib/ext2fs: call ext2fs_free_mem() to free &io->name, in exception branch zhanchengbin
2022-05-12 17:14 ` Theodore Ts'o [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=Yn1AYM7rLvRHXNgQ@mit.edu \
    --to=tytso@mit.edu \
    --cc=linfeilong@huawei.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=liuzhiqiang26@huawei.com \
    --cc=wubo40@huawei.com \
    --cc=zhanchengbin1@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).