Re: [PATCH v4 2/3] fs/binfmts: Better handling of binfmt loops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/14, Zach Levis wrote:
>
> +static void bprm_close_file(struct linux_binprm *bprm)
> +{
> +	if (bprm->mm) {
> +		acct_arg_size(bprm, 0);
> +		mmput(bprm->mm);
> +	}
> +
> +	if (bprm->file) {
> +		allow_write_access(bprm->file);
> +		fput(bprm->file);
> +	}
> +}

btw this doesn't look right too. This can be called multiple times
during the error handling.

Just suppose that search_binary_handler() does this at depth == 0
when it detects -ELOOP and then open_exec() fails. After that
we return to do_execve_common() which goes to "out:".

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux