aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorAkinobu Mita <mita@fixstars.com>2007-04-23 15:08:20 -0400
committerArnd Bergmann <arnd@klappe.arndb.de>2007-04-23 15:18:57 -0400
commitdb1384b40d12eda6910513ff429ad90453ca49e1 (patch)
tree1109e9776f52f614a198a693601d9e9ea60f715c /arch/powerpc/platforms
parentc99c1994a2bb9493b4ac372b2b6ee2606d291171 (diff)
[POWERPC] spufs: fix memory leak on spufs reloading
When SPU isolation mode enabled, isolated_loader would be allocated by spufs_init_isolated_loader() on module_init(). But anyone do not free it. This patch introduces spufs_exit_isolated_loader() which is the opposite of spufs_init_isolated_loader() and called on module_exit(). Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Akinobu Mita <mita@fixstars.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 5d09c2e8f39a..6b52dfabaeef 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -561,6 +561,11 @@ spufs_parse_options(char *options, struct inode *root)
561 return 1; 561 return 1;
562} 562}
563 563
564static void spufs_exit_isolated_loader(void)
565{
566 kfree(isolated_loader);
567}
568
564static void 569static void
565spufs_init_isolated_loader(void) 570spufs_init_isolated_loader(void)
566{ 571{
@@ -694,6 +699,7 @@ module_init(spufs_init);
694static void __exit spufs_exit(void) 699static void __exit spufs_exit(void)
695{ 700{
696 spu_sched_exit(); 701 spu_sched_exit();
702 spufs_exit_isolated_loader();
697 unregister_arch_coredump_calls(&spufs_coredump_calls); 703 unregister_arch_coredump_calls(&spufs_coredump_calls);
698 unregister_spu_syscalls(&spufs_calls); 704 unregister_spu_syscalls(&spufs_calls);
699 unregister_filesystem(&spufs_type); 705 unregister_filesystem(&spufs_type);