• Nick Piggin's avatar
    sysfs: fix deadlock · b31ca3f5
    Nick Piggin authored
    On Thu, Sep 11, 2008 at 10:27:10AM +0200, Ingo Molnar wrote:
    
    > and it's working fine on most boxes. One testbox found this new locking
    > scenario:
    >
    > PM: Adding info for No Bus:vcsa7
    > EDAC DEBUG: MC0: i82860_check()
    >
    > =======================================================
    > [ INFO: possible circular locking dependency detected ]
    > 2.6.27-rc6-tip #1
    > -------------------------------------------------------
    > X/4873 is trying to acquire lock:
    >  (&bb->mutex){--..}, at: [<c020ba20>] mmap+0x40/0xa0
    >
    > but task is already holding lock:
    >  (&mm->mmap_sem){----}, at: [<c0125a1e>] sys_mmap2+0x8e/0xc0
    >
    > which lock already depends on the new lock.
    >
    >
    > the existing dependency chain (in reverse order) is:
    >
    > -> #1 (&mm->mmap_sem){----}:
    >        [<c017dc96>] validate_chain+0xa96/0xf50
    >        [<c017ef2b>] __lock_acquire+0x2cb/0x5b0
    >        [<c017f299>] lock_acquire+0x89/0xc0
    >        [<c01aa8fb>] might_fault+0x6b/0x90
    >        [<c040b618>] copy_to_user+0x38/0x60
    >        [<c020bcfb>]...
    b31ca3f5
bin.c 5.88 KB