]> git.neil.brown.name Git - history.git/commitdiff
PATCH: fork.c bug in 0.99.pl11 0.99.11-patch1
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:09:12 +0000 (15:09 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:09:12 +0000 (15:09 -0500)
There is at least one known problem with 0.99pl11 - it's very minor and
will not lead to any real problems, but it's also very easy to fix,
so...

The problem is a one-liner oversight in kernel/fork.c (thanks to TjL for
noticing the symptoms - they aren't easy to see), which is fixed by the
following patch:

In fact, it's probably easiest to "apply" this patch by hand: just
change the "p->tss.fs = KERNEL_DS" in fork.c to "p->tss.fs = USER_DS"
and you should be fine.

            Linus

kernel/fork.c

index 88e769a0ec4ef0909725f8a3dcdc4ca82dfa2af7..fa5acff9ff545ff9e09d2bbb4a08f46d83a42171 100644 (file)
@@ -157,7 +157,7 @@ extern "C" int sys_fork(struct pt_regs regs)
        p->tss.cs = KERNEL_CS;
        p->tss.ss = KERNEL_DS;
        p->tss.ds = KERNEL_DS;
-       p->tss.fs = KERNEL_DS;
+       p->tss.fs = USER_DS;
        p->tss.gs = KERNEL_DS;
        p->tss.ss0 = KERNEL_DS;
        p->tss.esp0 = p->kernel_stack_page + PAGE_SIZE;