[lkml]   [1998]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: entry.S mess with %ebx (&current pointer)

    On Thu, 19 Nov 1998, Andrea Arcangeli wrote:
    > I am sure that the kernel run do_signal() from signal_return, even if
    > sigpending is 0. This mean that %ebx got corrupted somewhere (and this
    > explain very well also the need_resched flood I suspected some days ago).
    > A patch for 2.1.128 that fix the UP hang fine here is this:

    Good debugging, but the fix is incorrect (or at least unnecessarily slow).

    I see where the problem is, and I also see why it _only_ happens on UP.

    The problem is that the fork return point to the new process does not
    initialize %ebx in the UP case.

    It _does_ initialize it in the SMP case, and this is basically just an

    This patch should fix it properly, please tell me whether that is true..


    diff -u --recursive --new-file v2.1.129/linux/arch/i386/kernel/entry.S linux/arch/i386/kernel/entry.S
    --- v2.1.129/linux/arch/i386/kernel/entry.S Sun Nov 8 14:02:42 1998
    +++ linux/arch/i386/kernel/entry.S Thu Nov 19 09:53:08 1998
    @@ -150,14 +150,14 @@
    jmp ret_from_sys_call

    -#ifdef __SMP__
    .globl ret_from_smpfork
    +#ifdef __SMP__
    btrl $0, SYMBOL_NAME(scheduler_lock)
    - jmp ret_from_sys_call
    #endif /* __SMP__ */
    + jmp ret_from_sys_call

    * Return to user mode is not as complex as all this looks,
    diff -u --recursive --new-file v2.1.129/linux/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c
    --- v2.1.129/linux/arch/i386/kernel/process.c Fri Oct 9 13:27:05 1998
    +++ linux/arch/i386/kernel/process.c Thu Nov 19 09:53:35 1998
    @@ -50,11 +50,7 @@

    spinlock_t semaphore_wake_lock = SPIN_LOCK_UNLOCKED;

    -#ifdef __SMP__
    -asmlinkage void ret_from_fork(void) __asm__("ret_from_smpfork");
    -asmlinkage void ret_from_fork(void) __asm__("ret_from_sys_call");
    +asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");

    #ifdef CONFIG_APM
    extern int apm_do_idle(void);

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:45    [W:0.024 / U:59.660 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site