Skip to content

Commit

Permalink
[POWERPC] spufs: Refuse to load the module when not running on cell
Browse files Browse the repository at this point in the history
As noticed by David Woodhouse, it's currently possible to mount
spufs on any machine, which means that it actually will get
mounted by fedora.
This refuses to load the module on platforms that have no
support for SPUs.

Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Arnd Bergmann authored and Paul Mackerras committed Jun 7, 2007
1 parent 6291ed3 commit 8f18a15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,10 @@ spufs_create_root(struct super_block *sb, void *data)
struct inode *inode;
int ret;

ret = -ENODEV;
if (!spu_management_ops)
goto out;

ret = -ENOMEM;
inode = spufs_new_inode(sb, S_IFDIR | 0775);
if (!inode)
Expand Down

0 comments on commit 8f18a15

Please sign in to comment.