lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45A3613F.1050604@in.ibm.com>
Date:	Tue, 09 Jan 2007 15:02:47 +0530
From:	Srinivasa Ds <srinivasa@...ibm.com>
To:	Tomasz Kvarsin <kvarsin@...il.com>
CC:	linux-kernel@...r.kernel.org, jfs-discussion@...ts.sourceforge.net,
	shaggy@...tin.ibm.com, Andrew Morton <akpm@...l.org>,
	Linus Torvalds <torvalds@...l.org>
Subject: Re: JFS: possible recursive locking detected

Tomasz Kvarsin wrote:
> This I got during boot with 2.6.20-rc4:
> =============================================
> [ INFO: possible recursive locking detected ]
> 2.6.20-rc4 #3
> ---------------------------------------------
> mount/5819 is trying to acquire lock:
> (&jfs_ip->commit_mutex){--..}, at: [<c03395e1>] mutex_lock+0x21/0x30
>
> but task is already holding lock:
> (&jfs_ip->commit_mutex){--..}, at: [<c03395e1>] mutex_lock+0x21/0x30
>
> other info that might help us debug this:
> 2 locks held by mount/5819:
> #0:  (&inode->i_mutex){--..}, at: [<c03395e1>] mutex_lock+0x21/0x30
> #1:  (&jfs_ip->commit_mutex){--..}, at: [<c03395e1>] mutex_lock+0x21/0x30
>
Problem was in jfs_create(), it was calling 2 mutex_calls.
=============================================
static int jfs_create(struct inode *dip, struct dentry *dentry, int mode,
                struct nameidata *nd)
{
        int rc = 0;
        tid_t tid;              /* transaction id */
        struct inode *ip = NULL;        /* child directory inode */
        ino_t ino;
        struct component_name dname;    /* child directory name */
        struct btstack btstack;
        struct inode *iplist[2];
        struct tblock *tblk;

        jfs_info("jfs_create: dip:0x%p name:%s", dip, dentry->d_name.name);
      .....................................
       tid = txBegin(dip->i_sb, 0);

        mutex_lock(&JFS_IP(dip)->commit_mutex);
        mutex_lock(&JFS_IP(ip)->commit_mutex);

        rc = jfs_init_acl(tid, ip, dip);
        if (rc)
                goto out3;
=======================================

So below patch should fix this problem,please test this. Let me know 
your comments on this.

Signed-off-by: Srinivasa DS <srinivasa@...ibm.com>



View attachment "jfs.fix" of type "text/plain" (610 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ