mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kucera <kucera.jan.cz@gmail.com>
To: jfs-discussion@lists.sourceforge.net
Cc: shaggy@austin.ibm.com, linux-kernel@vger.kernel.org
Subject: Possible deadlock in jfs_imap.c?
Date: Sat, 23 May 2009 17:19:12 +0200	[thread overview]
Message-ID: <ef67228d0905230819x633f0cd0t4dd1be639906f9bc@mail.gmail.com> (raw)

Hi,

for my master thesis, I've designed static checker for finding deadlocks in C.
My tool found some possible deadlock in file fs/jfs/jfs_imap.c
between JFS_IP(ipimap)->commit_mutex and  imap->im_aglock[agno].

Reason of this problem is probably missed unlocking of
JFS_IP(ipimap)->commit_mutex in branch starting at line 2564 which
leaves JFS_IP(ipimap)->commit_mutex locked:

    in function diNewIAG(..)
        locking mutex_lock(&JFS_IP(ipimap)->commit_mutex) at line 2540
        condition at line 2543 is false
        condition at line 2564 is true
        goto out: at 2579
        IAGFREE_UNLOCK(imap); at line 2654
    return from diNewIAG(..) at line 2656

Version of kernel is 2.6.28 (maybe this code is in newer versions too).
Could someone confirm, that this is a real bug? Thank you for your time.

             reply	other threads:[~2009-05-23 15:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-23 15:19 Jan Kucera [this message]
2009-05-24  1:26 ` Dave Kleikamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef67228d0905230819x633f0cd0t4dd1be639906f9bc@mail.gmail.com \
    --to=kucera.jan.cz@gmail.com \
    --cc=jfs-discussion@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaggy@austin.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®