Skip to contentSkip to conversation

PATCH: free mm if spufs_fill_dir() failed

PATCH Sebastian Siewior 2 participants 2 messages May 4, 2007 – May 9, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

arch/powerpc/platforms/cell/spufs/inode.c +1 -0
Index: ps3-linux/arch/powerpc/platforms/cell/spufs/inode.c
===================================================================
@@ -277,6 +277,7 @@ spufs_mkdir(struct inode *dir, struct de
 	goto out;
 
 out_free_ctx:
+	spu_forget(ctx);
 	put_spu_context(ctx);
 out_iput:
 	iput(inode);
#1 lore raw

Sebastian,

Quoted 2 lines

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

Good catch. However - could we do the mmput in the context destroy path instead?

Also, you're probably better-off sending patches inline. It makes commenting on the patch much easier for some mailers.

Cheers,

Jeremy