LKML Archive on
help / color / mirror / Atom feed
* mm-search_binary_handler-mem-limit-fix is horribly broken
@ 2007-01-31 17:38 Jeff Dike
  0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2007-01-31 17:38 UTC (permalink / raw)
  Cc: linux-kernel

It works on i386 only by accident, and doesn't work at all with UML.

start_thread, which is called from inside the set_fs(USER_DS) -
set_fs(oldfs) does set_fs(USER_DS).  That is then blown away by the

A one-line fix might be

Index: linux-2.6.17/fs/exec.c
--- linux-2.6.17.orig/fs/exec.c 2007-01-31 12:10:08.000000000 -0500
+++ linux-2.6.17/fs/exec.c      2007-01-31 12:41:15.000000000 -0500
@@ -1079,6 +1079,7 @@ int search_binary_handler(struct linux_b
                        retval = fn(bprm, regs);
+                       oldfs = get_fs();
                        if (retval >= 0) {

but this seems like it's pasting one kludge on top of another.


Work email - jdike at linux dot intel dot com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-01-31 17:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-31 17:38 mm-search_binary_handler-mem-limit-fix is horribly broken Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).