[patch 13/13] spufs: initialize context correctly

Arnd Bergmann
2006-03-23T20:44:46Z

[-- Attachment #1: init_mfc.diff --]
[-- Type: text/plain, Size: 725 bytes --]

the mfc member of a new context was not initialized to zero,
which potentially leads to wild memory accesses.

From: Dirk Herrendoerfer <herrendo@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>

Index: linux-2.6.16-rc/arch/powerpc/platforms/cell/spufs/context.c
===================================================================
--- linux-2.6.16-rc.orig/arch/powerpc/platforms/cell/spufs/context.c
+++ linux-2.6.16-rc/arch/powerpc/platforms/cell/spufs/context.c
@@ -51,6 +51,7 @@ struct spu_context *alloc_spu_context(vo
ctx->ibox_fasync = NULL;
ctx->wbox_fasync = NULL;
ctx->mfc_fasync = NULL;
+ ctx->mfc = NULL;
ctx->tagwait = 0;
ctx->state = SPU_STATE_SAVED;
ctx->local_store = NULL;

--