diff options
author | Arnd Bergmann <arnd.bergmann@de.ibm.com> | 2007-06-04 09:26:51 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-06-06 21:44:39 -0400 |
commit | 8f18a158192ef6dc63a572bdbbdf5613cfbbe2e4 (patch) | |
tree | 18d5911fe8262d060fccd0b8b581a1b574aebb44 /arch/powerpc | |
parent | 6291ed3c04d5c83c26e77d4fa47e06d0416be81d (diff) |
[POWERPC] spufs: Refuse to load the module when not running on cell
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 7150730e2ff1..01c4805986f2 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -600,6 +600,10 @@ spufs_create_root(struct super_block *sb, void *data) | |||
600 | struct inode *inode; | 600 | struct inode *inode; |
601 | int ret; | 601 | int ret; |
602 | 602 | ||
603 | ret = -ENODEV; | ||
604 | if (!spu_management_ops) | ||
605 | goto out; | ||
606 | |||
603 | ret = -ENOMEM; | 607 | ret = -ENOMEM; |
604 | inode = spufs_new_inode(sb, S_IFDIR | 0775); | 608 | inode = spufs_new_inode(sb, S_IFDIR | 0775); |
605 | if (!inode) | 609 | if (!inode) |