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: <20200529130546.GR18421@twin.jikos.cz>
Date:   Fri, 29 May 2020 15:05:46 +0200
From:   David Sterba <dsterba@...e.cz>
To:     Joe Perches <joe@...ches.com>
Cc:     Yi Wang <wang.yi59@....com.cn>, clm@...com, josef@...icpanda.com,
        dsterba@...e.com, linux-btrfs@...r.kernel.org,
        linux-kernel@...r.kernel.org, xue.zhihong@....com.cn,
        wang.liang82@....com.cn, Liao Pingfang <liao.pingfang@....com.cn>
Subject: Re: [PATCH] btrfs: Replace kmalloc with kzalloc in the error message

On Thu, May 28, 2020 at 07:03:45PM -0700, Joe Perches wrote:
> On Fri, 2020-05-29 at 09:00 +0800, Yi Wang wrote:
> > From: Liao Pingfang <liao.pingfang@....com.cn>
> > 
> > Use kzalloc instead of kmalloc in the error message according to
> > the previous kzalloc() call.
> []
> > diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
> []
> > @@ -632,7 +632,7 @@ static int btrfsic_process_superblock(struct btrfsic_state *state,
> >  
> >  	selected_super = kzalloc(sizeof(*selected_super), GFP_NOFS);
> >  	if (NULL == selected_super) {
> > -		pr_info("btrfsic: error, kmalloc failed!\n");
> > +		pr_info("btrfsic: error, kzalloc failed!\n");
> 
> As there is a dump_stack() done on memory allocation
> failures, these messages might as well be deleted instead.

I wouldn't bother changing the strings, removing them entirely sounds
like a better idea to me.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ