• Ivan Kokshaysky's avatar
    [PATCH] alpha: execve() fix · 9a357b21
    Ivan Kokshaysky authored
    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.
    9a357b21
mmu_context.h 7.02 KB