Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4fd2c5b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
parents 711a49a0 85f33466
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1159,6 +1159,7 @@ EXPORT_SYMBOL(remove_arg_zero);
 */
int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
{
	unsigned int depth = bprm->recursion_depth;
	int try,retval;
	struct linux_binfmt *fmt;
#ifdef __alpha__
@@ -1219,7 +1220,14 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
				continue;
			read_unlock(&binfmt_lock);
			retval = fn(bprm, regs);
			/*
			 * Restore the depth counter to its starting value
			 * in this call, so we don't have to rely on every
			 * load_binary function to restore it on return.
			 */
			bprm->recursion_depth = depth;
			if (retval >= 0) {
				if (depth == 0)
					tracehook_report_exec(fmt, bprm, regs);
				put_binfmt(fmt);
				allow_write_access(bprm->file);