diff options
author | Ivan Kokshaysky <ink@jurassic.park.msu.ru> | 2008-04-24 16:54:50 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-24 08:35:47 -0700 |
commit | 2444e56b0c08e6f3e3877583841a1213e3263d98 (patch) | |
tree | b35291a16faa7930c64171ea8a4d2365686029fe | |
parent | 72cff12397cd6648b8b5abfaeb00502f45b76cb8 (diff) | |
download | kernel_samsung_tuna-2444e56b0c08e6f3e3877583841a1213e3263d98.zip kernel_samsung_tuna-2444e56b0c08e6f3e3877583841a1213e3263d98.tar.gz kernel_samsung_tuna-2444e56b0c08e6f3e3877583841a1213e3263d98.tar.bz2 |
alpha: unbreak OSF/1 (a.out) binaries
OSF/1 brk(2) was broken by following one-liner in sys_brk()
(commit 4cc6028d4040f95cdb590a87db478b42b8be0508):
- if (brk < mm->end_code)
+ if (brk < mm->start_brk)
goto out;
The problem is that osf_set_program_attributes()
does update mm->end_code, but not mm->start_brk,
which still contains inappropriate value left from
binary loader, so brk() always fails.
Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/alpha/kernel/osf_sys.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 8c71daf..9fee37e 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -75,6 +75,7 @@ osf_set_program_attributes(unsigned long text_start, unsigned long text_len, lock_kernel(); mm = current->mm; mm->end_code = bss_start + bss_len; + mm->start_brk = bss_start + bss_len; mm->brk = bss_start + bss_len; #if 0 printk("set_program_attributes(%lx %lx %lx %lx)\n", |