Commit:     8f18a158192ef6dc63a572bdbbdf5613cfbbe2e4
Parent:     6291ed3c04d5c83c26e77d4fa47e06d0416be81d
Author:     Arnd Bergmann <[EMAIL PROTECTED]>
AuthorDate: Mon Jun 4 23:26:51 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Thu Jun 7 11:44:39 2007 +1000

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Arnd Bergmann <[EMAIL PROTECTED]>
    Signed-off-by: Jeremy Kerr <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 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 
index 7150730..01c4805 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)
        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)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to