[Cbe-oss-dev] [PATCH] fix memory leak on spufs reloading
Christoph Hellwig
hch at lst.de
Thu Apr 5 18:42:01 EST 2007
On Wed, Mar 14, 2007 at 11:59:07AM +0900, Akinobu Mita wrote:
> 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 at arndb.de>
> Signed-off-by: Akinobu Mita <mita at fixstars.com>
Also still not in but looks good.
>
> ---
> arch/powerpc/platforms/cell/spufs/inode.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> Index: 2.6-git-ps3/arch/powerpc/platforms/cell/spufs/inode.c
> ===================================================================
> --- 2.6-git-ps3.orig/arch/powerpc/platforms/cell/spufs/inode.c
> +++ 2.6-git-ps3/arch/powerpc/platforms/cell/spufs/inode.c
> @@ -560,6 +560,11 @@ spufs_parse_options(char *options, struc
> return 1;
> }
>
> +static void spufs_exit_isolated_loader(void)
> +{
> + kfree(isolated_loader);
> +}
> +
> static void
> spufs_init_isolated_loader(void)
> {
> @@ -693,6 +698,7 @@ module_init(spufs_init);
> static void __exit spufs_exit(void)
> {
> spu_sched_exit();
> + spufs_exit_isolated_loader();
> unregister_arch_coredump_calls(&spufs_coredump_calls);
> unregister_spu_syscalls(&spufs_calls);
> unregister_filesystem(&spufs_type);
> _______________________________________________
> cbe-oss-dev mailing list
> cbe-oss-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/cbe-oss-dev
---end quoted text---
More information about the cbe-oss-dev
mailing list