lkml.org 
[lkml]   [2007]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH -rt] make spin_unlock to slab_spin_unlock

    Ingo,

    I hit this bug on one of my work test machines. This bug is probably what
    caused my laptop to crash ever so often too, but since I don't have a
    serial or other debug output, my laptop never showed what was wrong.

    Here's the call trace:

    ------------[ cut here ]------------
    kernel BUG at kernel/rtmutex.c:649!
    invalid opcode: 0000 [1] PREEMPT SMP
    CPU 2
    [...]
    Call Trace:
    [<ffffffff802661a7>] rt_spin_lock+0x1f/0x21
    [<ffffffff802df73b>] drain_freelist+0x4f/0xeb
    [<ffffffff802df941>] cache_reap+0x16a/0x26d
    [<ffffffff8024f29e>] run_workqueue+0x9f/0xf9
    [<ffffffff8024bbe3>] worker_thread+0x11b/0x152
    [<ffffffff80233fcb>] kthread+0xee/0x11a
    [<ffffffff802600f8>] child_rip+0xa/0x12


    Seems that the goto out of the loop was not updated to be a
    slab_spin_unlock, so there was a way out that would not unlock the slab
    cpu lock.

    -- Steve

    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

    Index: linux-2.6.20-rc5-rt7/mm/slab.c
    ===================================================================
    --- linux-2.6.20-rc5-rt7.orig/mm/slab.c 2007-01-22 14:05:35.000000000 -0500
    +++ linux-2.6.20-rc5-rt7/mm/slab.c 2007-01-22 14:06:07.000000000 -0500
    @@ -2564,7 +2564,7 @@ static int drain_freelist(struct kmem_ca
    slab_spin_lock_irq(&l3->list_lock, this_cpu);
    p = l3->slabs_free.prev;
    if (p == &l3->slabs_free) {
    - spin_unlock_irq(&l3->list_lock);
    + slab_spin_unlock_irq(&l3->list_lock, this_cpu);
    goto out;
    }

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

    \
     
     \ /
      Last update: 2007-01-22 20:55    [W:0.027 / U:0.048 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site