public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb•de>
To: linuxppc-dev@ozlabs•org
Cc: Stefan Wald <WALD@de•ibm.com>, Jeremy Kerr <jk@ozlabs•org>,
	cbe-oss-dev@ozlabs•org
Subject: Re: [Cbe-oss-dev] 2.6.26-rc6 kernel bug on PS3?
Date: Thu, 26 Jun 2008 10:11:47 +0200	[thread overview]
Message-ID: <200806261011.47500.arnd@arndb.de> (raw)
In-Reply-To: <200806261046.16763.jk@ozlabs.org>

On Thursday 26 June 2008, Jeremy Kerr wrote:
> > Application hangs after a while defunct and dmesg output looks like
> > d.txt. (See attached file: d.txt)
>=20
> Looks like this is caused by doing the mmput() while the state mutex is=20
> held in spu_forget.
>=20
> In your case, the mm is the final reference to the context, so this is=20
> resulting in a destroy_spu_context, which requires the state mutex :)
>=20
> I'm going to take a look at the sequencing of spu_forget, but would like=
=20
> to write a test case. Could you tell us about the exit path of your=20
> program?

=46rom my looking at the log, I first had the same impression, but=20
I concluded that it's got to be more complicated than that:

mmput() in spu_forget should not result in destroying the context
that we're forgetting, because we still hold a reference on the
inode that will be released later in the final fput.
What this means is that doing the close in this context will
result in destroying another (already forgotten) context that
is still referenced by our mm.

Lockdep warns about this because it can't guarantee that you
don't have two instances of contexts that do this to each other.
I'm fairly sure it can't happen here, and the lockdep warning
is a red herring, probably another thread is holding the mutex
already.

	Arnd <><

      reply	other threads:[~2008-06-26  8:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-25 13:01 2.6.26-rc6 kernel bug on PS3? Stefan Wald
2008-06-25 19:17 ` [Cbe-oss-dev] " Geoff Levand
2008-06-25 19:53   ` Stefan Wald
2008-06-25 22:56     ` Benjamin Herrenschmidt
2008-06-26  6:17       ` Stefan Wald
2008-06-26  0:46 ` Jeremy Kerr
2008-06-26  8:11   ` Arnd Bergmann [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=200806261011.47500.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=WALD@de$(echo .)ibm.com \
    --cc=cbe-oss-dev@ozlabs$(echo .)org \
    --cc=jk@ozlabs$(echo .)org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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