From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
To: Jan Kucera <kucera.jan.cz@gmail.com>
Cc: JFS Discussion <jfs-discussion@lists.sourceforge.net>,
linux-kernel@vger.kernel.org
Subject: Re: Possible deadlock in jfs_imap.c?
Date: Sat, 23 May 2009 20:26:50 -0500 [thread overview]
Message-ID: <1243128410.27493.2.camel@norville.austin.ibm.com> (raw)
In-Reply-To: <ef67228d0905230819x633f0cd0t4dd1be639906f9bc@mail.gmail.com>
On Sat, 2009-05-23 at 17:19 +0200, Jan Kucera wrote:
> 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.
Yes, it looks like a real bug. As the comment states, it's an unlikely
error path. This would explain how it went undetected this long. Should
be fixed anyway.
Thanks,
Shaggy
--
David Kleikamp
IBM Linux Technology Center
prev parent reply other threads:[~2009-05-24 1:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-23 15:19 Jan Kucera
2009-05-24 1:26 ` Dave Kleikamp [this message]
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=1243128410.27493.2.camel@norville.austin.ibm.com \
--to=shaggy@linux.vnet.ibm.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=kucera.jan.cz@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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®