Bug 16034 - 2.6.34: dlm: possible circular locking dependency detected
Summary: 2.6.34: dlm: possible circular locking dependency detected
Status: CLOSED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: ocfs2 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_ocfs2
URL:
Keywords:
Depends on:
Blocks: 15310
  Show dependency tree
 
Reported: 2010-05-23 06:33 UTC by Maciej Rutecki
Modified: 2010-07-09 23:26 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.34
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Maciej Rutecki 2010-05-23 06:33:26 UTC
Subject    : 2.6.34: dlm: possible circular locking dependency detected
Submitter  : CaT <cat@zip.com.au>
Date       : 2010-05-21 6:59
Message-ID : 20100521065933.GH2657@zip.com.au
References : http://marc.info/?l=linux-kernel&m=127442519608471&w=2

This entry is being used for tracking a regression from 2.6.33.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Cat 2010-05-23 23:53:13 UTC
This also happens with 2.6.33.4.
Comment 2 Dan Carpenter 2010-06-19 12:00:00 UTC
I don't know the policy in for the stable kernel or for bugzilla, but this was fixed in 2.6.35.  The commit is:

commit d9ef75221a6247b758e1d7e18edb661996e4b7cf
Author: Wengang Wang <wen.gang.wang@oracle.com>
Date:   Mon May 17 20:20:44 2010 +0800

    ocfs2:dlm: avoid dlm->ast_lock lockres->spinlock dependency break
    
    Currently we process a dirty lockres with the lockres->spinlock taken. While
    during the process, we may need to lock on dlm->ast_lock. This breaks the
    dependency of dlm->ast_lock(lock first) and lockres->spinlock(lock second).
    
    This patch fixes the problem.
    Since we can't release lockres->spinlock, we have to take dlm->ast_lock
    just before taking the lockres->spinlock and release it after lockres->spinlock
    is released. And use __dlm_queue_bast()/__dlm_queue_ast(), the nolock version,
    in dlm_shuffle_lists(). There are no too many locks on a lockres, so there is no
    performance harm.
    
    Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
    Signed-off-by: Joel Becker <joel.becker@oracle.com>
Comment 3 Rafael J. Wysocki 2010-07-09 23:26:15 UTC
The problem has been fixed in mainline, so closing.

Please send an inclusion request to stable@kernel.org so that it goes to -stable.

Note You need to log in before you can comment on or make changes to this bug.