[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200715063456.GC32470@infradead.org>
Date: Wed, 15 Jul 2020 07:34:56 +0100
From: Christoph Hellwig <hch@...radead.org>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>,
Andy Lutomirski <luto@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Al Viro <viro@...iv.linux.org.uk>,
Luis Chamberlain <mcgrof@...nel.org>,
linux-fsdevel@...r.kernel.org,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
linux-security-module@...r.kernel.org,
"Serge E. Hallyn" <serge@...lyn.com>,
James Morris <jmorris@...ei.org>,
Kentaro Takeda <takedakn@...data.co.jp>,
Casey Schaufler <casey@...aufler-ca.com>,
John Johansen <john.johansen@...onical.com>,
Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH 3/7] exec: Move initialization of bprm->filename into
alloc_bprm
On Tue, Jul 14, 2020 at 08:29:36AM -0500, Eric W. Biederman wrote:
>
> -static struct linux_binprm *alloc_bprm(void)
> +static struct linux_binprm *alloc_bprm(int fd, struct filename *filename)
> {
> struct linux_binprm *bprm = kzalloc(sizeof(*bprm), GFP_KERNEL);
> + int retval = -ENOMEM;
> if (!bprm)
> - return ERR_PTR(-ENOMEM);
> + goto out;
> +
Ok, so here we add to it. Two nitpicks:
The abose is missing a blank line after the declarations, which really
makes things more readable. Also no need for the goto there.
Otherwisel ooks good:
Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists