summary refs log tree commit diff
path: root/fs/exec.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-06-15 14:57:39 -0600
committerGrant Likely <grant.likely@secretlab.ca>2011-06-15 14:57:39 -0600
commit2bc7c85210d75b7a8a7326284b4f608a16f52ffc (patch)
treeca306d89f64ceeee92531cc0a9ba5d246d09f044 /fs/exec.c
parent12610be33df5563d3f8cb141f231d4dc5b2a317f (diff)
parentdf2212270ce94f12e9caed6ca04c7077672d588e (diff)
downloadlinux-2bc7c85210d75b7a8a7326284b4f608a16f52ffc.tar.gz
Merge branch 'gpio/next-tegra' into gpio/next
Conflicts:
	drivers/gpio/Kconfig
	drivers/gpio/Makefile
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/exec.c b/fs/exec.c
index ea5f748906a8..97e0d52d72fd 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1093,6 +1093,7 @@ int flush_old_exec(struct linux_binprm * bprm)
 
 	bprm->mm = NULL;		/* We're using it now */
 
+	set_fs(USER_DS);
 	current->flags &= ~(PF_RANDOMIZE | PF_KTHREAD);
 	flush_thread();
 	current->personality &= ~bprm->per_clear;
@@ -1357,10 +1358,6 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
 	if (retval)
 		return retval;
 
-	/* kernel module loader fixup */
-	/* so we don't try to load run modprobe in kernel space. */
-	set_fs(USER_DS);
-
 	retval = audit_bprm(bprm);
 	if (retval)
 		return retval;