[PATCH] spufs: check for proper file pointer in sys_spu_run
authorArnd Bergmann <arnd@arndb.de>
Wed, 4 Jan 2006 19:31:23 +0000 (20:31 +0100)
committerPaul Mackerras <paulus@samba.org>
Mon, 9 Jan 2006 04:44:38 +0000 (15:44 +1100)
commite80358ad8606382154d97165121602dfae213e4a
treeb63e3e21cd0f4c1c086f958d05c6fa3298408746
parentc8ca0633e5f2bceab7b4eba4475820fd7674dece
[PATCH] spufs: check for proper file pointer in sys_spu_run

Only checking for SPUFS_MAGIC is not reliable, because
it might not be unique in theory. Worse than that,
we accidentally allow spu_run to be performed on
any file in spufs, not just those returned from
spu_create as intended.

Noticed by Al Viro.

Signed-off-by: Arnd Bergmann <arndb@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/cell/spufs/inode.c
arch/powerpc/platforms/cell/spufs/spufs.h
arch/powerpc/platforms/cell/spufs/syscalls.c