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] [thread-next>] [day] [month] [year] [list]
Message-id: <166673341340.7585.173987927705263434@noble.neil.brown.name>
Date:   Wed, 26 Oct 2022 08:30:13 +1100
From:   "NeilBrown" <neilb@...e.de>
To:     "Li zeming" <zeming@...china.com>
Cc:     willy@...radead.org, jlayton@...nel.org, song@...nel.org,
        bvanassche@....org, reiserfs-devel@...r.kernel.org,
        linux-kernel@...r.kernel.org, "Li zeming" <zeming@...china.com>
Subject: Re: [PATCH] reiserfs: journal: Increase jl pointer check

On Tue, 25 Oct 2022, Li zeming wrote:
> If kzalloc fails to allocate the jl pointer, NULL is returned directly.
> 
> Signed-off-by: Li zeming <zeming@...china.com>
> ---
>  fs/reiserfs/journal.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
> index 94addfcefede..d64e9de126c1 100644
> --- a/fs/reiserfs/journal.c
> +++ b/fs/reiserfs/journal.c
> @@ -2569,6 +2569,9 @@ static struct reiserfs_journal_list *alloc_journal_list(struct super_block *s)
>  	struct reiserfs_journal_list *jl;
>  	jl = kzalloc(sizeof(struct reiserfs_journal_list),
>  		     GFP_NOFS | __GFP_NOFAIL);
> +	if (!jl)
> +		return NULL;
> +

What do you think the __GFP_NOFAIL flag might mean?

NeilBrown



>  	INIT_LIST_HEAD(&jl->j_list);
>  	INIT_LIST_HEAD(&jl->j_working_list);
>  	INIT_LIST_HEAD(&jl->j_tail_bh_list);
> -- 
> 2.18.2
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ