[Cbe-oss-dev] [PATCH] cell: fix errno for modular spufs_create with invalid neighbour
Jeremy Kerr
jk at ozlabs.org
Mon Aug 13 13:22:44 EST 2007
At present, spu_create with an invalid neighbo(u)r will return -ENOSYS,
not -EBADF, but only when spufs.o is built as a module.
This change adds the appropriate errno, making the behaviour the same
as the built-in case.
Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
Paulus - pending Arnd's ack, could you send this on for .23?
---
arch/powerpc/platforms/cell/spu_syscalls.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/cell/spu_syscalls.c b/arch/powerpc/platforms/cell/spu_syscalls.c
index dd2c668..027ac32 100644
--- a/arch/powerpc/platforms/cell/spu_syscalls.c
+++ b/arch/powerpc/platforms/cell/spu_syscalls.c
@@ -45,6 +45,7 @@ asmlinkage long sys_spu_create(const char __user *name,
if (owner && try_module_get(owner)) {
if (flags & SPU_CREATE_AFFINITY_SPU) {
neighbor = fget_light(neighbor_fd, &fput_needed);
+ ret = -EBADF;
if (neighbor) {
ret = spufs_calls.create_thread(name, flags,
mode, neighbor);
--
1.5.0.rc4.g85b1
More information about the cbe-oss-dev
mailing list