[lkml]   [2007]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subjecti386 doublefault handler is broken with CONFIG_DEBUG_SPINLOCK
    The new percpu code has apparently broken the doublefault handler
    when CONFIG_DEBUG_SPINLOCK is set. Doublefault is handled by
    a hardware task, making the check

    SPIN_BUG_ON(lock->owner == current, lock, "recursion");

    fault because it uses the FS register to access the percpu data
    for current, and that register is zero in the new TSS. (The trace
    I saw was on 2.6.20 where it was GS, but it looks like this will
    still happen with FS on 2.6.22.)

    Initializing FS in the doublefault_tss should fix it.

    Signed-off-by: Chuck Ebbert <>


    NOTE: not even compile tested.

    arch/i386/kernel/doublefault.c | 1 +
    1 file changed, 1 insertion(+)

    --- linux-2.6.22.noarch.orig/arch/i386/kernel/doublefault.c
    +++ linux-2.6.22.noarch/arch/i386/kernel/doublefault.c
    @@ -63,6 +63,7 @@ struct tss_struct doublefault_tss __cach
    .cs = __KERNEL_CS,
    .ss = __KERNEL_DS,
    .ds = __USER_DS,
    + .fs = __KERNEL_PERCPU,

    .__cr3 = __pa(swapper_pg_dir)
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at
     \ /
      Last update: 2007-08-09 18:53    [W:0.019 / U:10.296 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site