From: viro@parcelfarce.linux.theplanet.co.uk
To: Dawson Engler <engler@coverity.dreamhost.com>
Cc: linux-kernel@vger.kernel.org, developers@coverity.com
Subject: Re: [CHECKER] possible deadlock in 2.6.8.1 lockd code
Date: Wed, 8 Sep 2004 04:34:10 +0100 [thread overview]
Message-ID: <20040908033410.GU23987@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.58.0409071956380.6778@coverity.dreamhost.com>
On Tue, Sep 07, 2004 at 07:57:28PM -0700, Dawson Engler wrote:
> Hi All,
>
> below is a possible deadlock in the linux-2.6.8.1 lockd code found by a
> static deadlock checker I'm writing. Let me know if it looks valid and/or
> whether the output is too cryptic. (Note, the locking dependencies go
> across a bunch of function calls, so the paths may be infeasible.)
It's a BS - down() and lock_kernel() do not form a mutual deadlock.
Consider minimal deadlocked state. By definition, we can exclude tasks
that didn't manage to get at least one lock (we would still have a deadlocked
set without them and we have chosen a minimal set). Consider the task
that holds semaphore; since we have a deadlock, it would have to be spinning
in lock_kernel(). That requires another task in our set to be holding BKL _and_
having the timeslice, since BKL is dropped when task loses CPU. But such
task would not be blocked on anything - it can't be blocked on semaphore
since it is runnable and it can't be blocked on BKL since it's already holding
it. In other words, it could not be a part of our deadlock. QED.
next prev parent reply other threads:[~2004-09-08 3:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-08 2:57 Dawson Engler
2004-09-08 3:28 ` Trond Myklebust
2004-09-08 3:34 ` viro [this message]
2004-09-08 3:45 ` Greg Banks
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=20040908033410.GU23987@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=developers@coverity.com \
--cc=engler@coverity.dreamhost.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®