lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHc6FU6hiOHS-b7Ft0AwL+aOZwwgE6WjiJuN1ZRi2k2aH6Si8Q@mail.gmail.com>
Date:   Thu, 2 Jun 2022 09:57:32 +0200
From:   Andreas Gruenbacher <agruenba@...hat.com>
To:     cgel.zte@...il.com
Cc:     Bob Peterson <rpeterso@...hat.com>,
        cluster-devel <cluster-devel@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] gfs2: Remove redundant NULL check before kfree

On Thu, Jun 2, 2022 at 9:19 AM <cgel.zte@...il.com> wrote:
> From: Minghao Chi <chi.minghao@....com.cn>
>
> kfree on NULL pointer is a no-op.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
> ---
>  fs/gfs2/file.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
> index 2cceb193dcd8..d8f1239344c1 100644
> --- a/fs/gfs2/file.c
> +++ b/fs/gfs2/file.c
> @@ -1066,8 +1066,7 @@ static ssize_t gfs2_file_buffered_write(struct kiocb *iocb,
>                 gfs2_glock_dq(gh);
>  out_uninit:
>         gfs2_holder_uninit(gh);
> -       if (statfs_gh)
> -               kfree(statfs_gh);
> +       kfree(statfs_gh);
>         from->count = orig_count - written;
>         return written ? written : ret;
>  }
> --
> 2.25.1
>

Added to for-next, thanks.

Andreas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ