]> git.hungrycats.org Git - linux/commit
[PATCH] alpha: execve() fix
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>
Tue, 15 Apr 2003 03:56:48 +0000 (20:56 -0700)
committerRichard Henderson <rth@are.twiddle.net>
Tue, 15 Apr 2003 03:56:48 +0000 (20:56 -0700)
commit9a357b21ba77fdae70a6d84841bfe1b4217fb661
treefa5311344b8736991146e1475b788fb9086f2ac7
parentcacc230d3a2f8812fe29a2ed8c0d5814d6e8a37d
[PATCH] alpha: execve() fix

The 2.5 kernels may hang on execve(). Most easily this can be reproduced
by submitting forms in mozilla, apparently because it does execve with
very long argument strings.
That's what happens in do_execve, I suppose:
bprm.mm = mm_alloc();
...
init_new_context(current, bprm.mm); here we update current ptbr
    with new mm->pgd
...
copy_strings;
interrupt -> do_softirq -> switch to ksoftirqd
...
switch back to do_execve;
copy_strings -  immediate page fault in copy_user that we can't
handle because the new ptbr has been activated
after context switch and current->mm is not
valid anymore.

The fix is to not update ptbr for current task in init_new_context(),
as we do it later in activate_mm() anyway.

With it my (UP) boxes look quite stable so far.

Ivan.
include/asm-alpha/mmu_context.h