소스 검색

[PATCH] spufs: initialize context correctly

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

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Dirk Herrendoerfer 19 년 전
부모
커밋
ca3e91cb0c
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      arch/powerpc/platforms/cell/spufs/context.c

+ 1 - 0
arch/powerpc/platforms/cell/spufs/context.c

@@ -51,6 +51,7 @@ struct spu_context *alloc_spu_context(void)
 	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;