lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200705301303.09616.arnd@arndb.de>
Date:	Wed, 30 May 2007 13:03:09 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Christoph Hellwig <hch@....de>
Cc:	cbe-oss-dev@...abs.org, gregkh@...e.de,
	linux-kernel@...r.kernel.org,
	Geoff Levand <geoffrey.levand@...sony.com>
Subject: Re: [Cbe-oss-dev] [RFC] Cell: shutdown method for spu_sysdev_class

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@...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@...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;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ