lkml.org 
[lkml]   [2020]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/5] exec: Remove recursion from search_binary_handler
From
Date
On 2020/05/10 4:41, Eric W. Biederman wrote:
> --- a/fs/binfmt_misc.c
> +++ b/fs/binfmt_misc.c
> @@ -234,10 +234,7 @@ static int load_misc_binary(struct linux_binprm *bprm)
> if (retval < 0)
> goto error;
>
> - retval = search_binary_handler(bprm);
> - if (retval < 0)
> - goto error;
> -
> + retval = 1; /* Search for the interpreter */
> ret:
> dput(fmt->dentry);
> return retval;

Wouldn't this change cause

if (fd_binary > 0)
ksys_close(fd_binary);
bprm->interp_flags = 0;
bprm->interp_data = 0;

not to be called when "Search for the interpreter" failed?

\
 
 \ /
  Last update: 2020-05-10 06:25    [W:0.374 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site