提交 db1384b4 编写于 作者: A Akinobu Mita 提交者: Arnd Bergmann

[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: NAkinobu Mita <mita@fixstars.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
上级 c99c1994
......@@ -561,6 +561,11 @@ spufs_parse_options(char *options, struct inode *root)
return 1;
}
static void spufs_exit_isolated_loader(void)
{
kfree(isolated_loader);
}
static void
spufs_init_isolated_loader(void)
{
......@@ -694,6 +699,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册