Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad941fe4 authored by Jeremy Kerr's avatar Jeremy Kerr Committed by Paul Mackerras
Browse files

[POWERPC] cell: Fix errno for modular spufs_create with invalid neighbour



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: default avatarJeremy Kerr <jk@ozlabs.org>
Acked-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 28e8351a
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -45,6 +45,7 @@ asmlinkage long sys_spu_create(const char __user *name,
	if (owner && try_module_get(owner)) {
	if (owner && try_module_get(owner)) {
		if (flags & SPU_CREATE_AFFINITY_SPU) {
		if (flags & SPU_CREATE_AFFINITY_SPU) {
			neighbor = fget_light(neighbor_fd, &fput_needed);
			neighbor = fget_light(neighbor_fd, &fput_needed);
			ret = -EBADF;
			if (neighbor) {
			if (neighbor) {
				ret = spufs_calls.create_thread(name, flags,
				ret = spufs_calls.create_thread(name, flags,
								mode, neighbor);
								mode, neighbor);