[Cbe-oss-dev] [PATCH 4/6] spufs: free mm if spufs_fill_dir() failed

Jeremy Kerr jk at ozlabs.org
Mon Jun 4 23:26:51 EST 2007


From: Sebastian Siewior <bigeasy at linux.vnet.ibm.com>

In case spufs_fill_dir() fails only put_spu_context()
gets called for cleanup and the acquired mm_struct never gets freed.

Signed-off-by: Sebastian Siewior <bigeasy at linux.vnet.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann at de.ibm.com>
Signed-off-by: Jeremy Kerr <jk at ozlabs.org>

---

 arch/powerpc/platforms/cell/spufs/inode.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/inode.c
===================================================================
--- linux-2.6-spufs.orig/arch/powerpc/platforms/cell/spufs/inode.c
+++ linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/inode.c
@@ -274,6 +274,7 @@ spufs_mkdir(struct inode *dir, struct de
 	goto out;
 
 out_free_ctx:
+	spu_forget(ctx);
 	put_spu_context(ctx);
 out_iput:
 	iput(inode);



More information about the cbe-oss-dev mailing list