Re: [patch] spinlock-debug fix

From: Reuben Farrelly (reuben-lkml_at_reub.net)
Date: 06/27/05

  • Next message: CommsAccounts: "Revenue Statement"
    Date:	Mon, 27 Jun 2005 22:57:07 +1200
    To: Ingo Molnar <mingo@elte.hu>
    
    

    Hi,

    On 27/06/2005 9:48 p.m., Ingo Molnar wrote:
    > * Andrew Morton <akpm@osdl.org> wrote:
    >
    >> Reuben Farrelly <reuben-lkml@reub.net> wrote:
    >>> > Anyway, scary trace. It look like some spinlock is thought to be in the
    >>> > wrong state in schedule(). Send the .config, please.
    >>>
    >>> Now online at http://www.reub.net/kernel/.config
    >> Me too.
    >>
    >> BUG: spinlock recursion on CPU#0, swapper/0, c120d520
    >> [<c01039ed>] dump_stack+0x19/0x20
    >> [<c01d9af2>] spin_bug+0x42/0x54
    >> [<c01d9bfa>] _raw_spin_lock+0x3e/0x84
    >> [<c031d0ad>] _spin_lock+0x9/0x10
    >> [<c031b9e9>] schedule+0x479/0xbc8
    >> [<c0100cb4>] cpu_idle+0x88/0x8c
    >> [<c01002c1>] rest_init+0x21/0x28
    >> [<c0442899>] start_kernel+0x151/0x158
    >> [<c010020f>] 0xc010020f
    >> Kernel panic - not syncing: bad locking
    >>
    >> The bug is in the new spinlock debugging code itself. Ingo, can you
    >> test that .config please?
    >
    > couldnt reproduce it on an UP box, nor on an SMP/HT 2/4-way box, but it
    > finally triggered on a 2-way SMP box.
    >
    > the bug is that current->pid is not a unique identifier on SMP (doh!).
    >
    > The patch below fixes the bug - which also happens to be a speedup for
    > the debugging code, as the ->pid dereferencing does not have to be done
    > anymore. Also, i've disabled the panicing for now.
    >
    > Ingo

    This patch fixes it - thanks Ingo.

    reuben
    -
    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/


  • Next message: CommsAccounts: "Revenue Statement"

    Relevant Pages

    • [PATCH] 5/5 ibmveth fix failed addbuf
      ... This patch fixes a bug that happens when the hypervisor can't add a ... called BUG(). ... The patch writes the right value into the free_map array ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] fix memory leak while coredumping
      ... > with some help of coworker, I found a bug in binfmt_elf.c. ... > This patch fixes a memory leak that happens when a core file hits the ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [Ext2-devel] [RFC] ext3/jbd race: releasing in-use journal_heads
      ... I looked at few journalling bugs recently on RHEL4 testing here. ... I am wondering if your patch fixes this following BUG also? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH 5/5] ibmveth fix failed addbuf
      ... This patch fixes a bug that happens when the hypervisor can't add a ... called BUG(). ... The patch writes the right value into the free_map array ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • cciss update [1 of 6]
      ... This patch fixes a bug in our call to copy_to_user in our 32/64 conversions. ... We were passing in the sizeof the address instead of the sizeof the struct. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)