From: Arnd Bergmann <arnd@arndb.de>
To: Christoph Hellwig <hch@lst.de>
Cc: cbe-oss-dev@ozlabs.org, gregkh@suse.de,
linux-kernel@vger.kernel.org,
Geoff Levand <geoffrey.levand@am.sony.com>
Subject: Re: [Cbe-oss-dev] [RFC] Cell: shutdown method for spu_sysdev_class
Date: Wed, 30 May 2007 13:03:09 +0200 [thread overview]
Message-ID: <200705301303.09616.arnd@arndb.de> (raw)
In-Reply-To: <20070530095821.GA24373@lst.de>
On Wednesday 30 May 2007, Christoph Hellwig wrote:
>
> > Is it documented or implied somewhere that ->shutdown must not free
> > the device? If not, the first option is probably the safer choice.
>
> It's not documented anywhere, but implicitly assumed. I don't know
> of any shutdown implementation that frees the device.
Right, I found the explanation now myself:
The ->shutdown method is called for system devices that are still
part of a linked linked list. Freeing the object would destroy that
list.
Geoff, please merge the patch below in your tree.
Arnd <><
---
Subject: cell: don't free spu objects in sysdev shutdown
From: Arnd Bergmann <arnd.bergmann@de.ibm.com>
System devices are accessed after they are shut down, so
we must not free the data structures.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Index: linux-2.6/arch/powerpc/platforms/cell/spu_base.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spu_base.c
+++ linux-2.6/arch/powerpc/platforms/cell/spu_base.c
@@ -517,7 +517,6 @@ static int spu_shutdown(struct sys_devic
spu_free_irqs(spu);
spu_destroy_spu(spu);
- kfree(spu);
return 0;
}
prev parent reply other threads:[~2007-05-30 11:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <463D1A2F.10708@am.sony.com>
2007-05-29 18:23 ` [Cbe-oss-dev] [RFC] Cell: shutdown method for spu_sysdev_class Arnd Bergmann
2007-05-30 9:58 ` Christoph Hellwig
2007-05-30 11:03 ` 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=200705301303.09616.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=cbe-oss-dev@ozlabs.org \
--cc=geoffrey.levand@am.sony.com \
--cc=gregkh@suse.de \
--cc=hch@lst.de \
--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