
From: Anton Blanchard <anton@samba.org>

On success getaffinity should return the size of mask.  It looks like
Randy's patch (which fixed a bogus return) missed this bit.

In reality I'm not sure if we care, and with cpu bitmasks this stuff is
going to break.



 kernel/compat.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -puN kernel/compat.c~getaffinity-return-val-fix kernel/compat.c
--- 25/kernel/compat.c~getaffinity-return-val-fix	2003-07-13 19:55:11.000000000 -0700
+++ 25-akpm/kernel/compat.c	2003-07-13 19:55:11.000000000 -0700
@@ -425,9 +425,11 @@ asmlinkage int compat_sys_sched_getaffin
 				    &kernel_mask);
 	set_fs(old_fs);
 
-	if (ret > 0)
+	if (ret > 0) {
+		ret = sizeof(compat_ulong_t);
 		if (put_user(kernel_mask, user_mask_ptr))
 			return -EFAULT;
+	}
 
 	return ret;
 }

_
