diff options
author | Arnd Bergmann <arnd@arndb.de> | 2006-01-04 20:31:23 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-09 15:44:38 +1100 |
commit | e80358ad8606382154d97165121602dfae213e4a (patch) | |
tree | b63e3e21cd0f4c1c086f958d05c6fa3298408746 /arch/powerpc/platforms/cell/spufs/spufs.h | |
parent | c8ca0633e5f2bceab7b4eba4475820fd7674dece (diff) |
[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>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/spufs.h')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/spufs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index 17cae5e5fdf..420953b5888 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h @@ -103,6 +103,7 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx, u32 *npc, u32 *status); long spufs_create_thread(struct nameidata *nd, const char *name, unsigned int flags, mode_t mode); +extern struct file_operations spufs_context_fops; /* context management */ struct spu_context * alloc_spu_context(struct address_space *local_store); |