Re: 2.4.0-tes6 broke %gs handling again (x86 of course)

From: Ulrich Drepper (drepper@redhat.com)
Date: Sat Aug 12 2000 - 15:55:04 EST


Thanks for the instructions. The appended patch following them indeed
fixes the problem.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- kernel/fork.c-save Sat Aug 12 13:49:49 2000 +++ kernel/fork.c Sat Aug 12 13:49:51 2000 @@ -123,7 +123,7 @@ return last_pid; } -static inline int dup_mmap(struct mm_struct * mm) +static inline int dup_mmap(struct mm_struct * mm, struct task_struct * tsk) { struct vm_area_struct * mpnt, *tmp, **pprev; int retval; @@ -138,7 +138,12 @@ mm->cpu_vm_mask = 0; mm->swap_cnt = 0; mm->swap_address = 0; - mm->segments = NULL; + + /* + * child gets a private LDT (if there was an LDT in the parent) + */ + copy_segments(tsk, mm); + pprev = &mm->mmap; for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) { struct file *file; @@ -314,13 +319,8 @@ tsk->mm = mm; tsk->active_mm = mm; - /* - * child gets a private LDT (if there was an LDT in the parent) - */ - copy_segments(tsk, mm); - down(&current->mm->mmap_sem); - retval = dup_mmap(mm); + retval = dup_mmap(mm, tsk); up(&current->mm->mmap_sem); if (retval) goto free_pt;

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:28 EST