Commit 89001a84 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fix return of compat_sys_sched_getaffinity

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.
parent 0490d8f2
...@@ -425,9 +425,11 @@ asmlinkage int compat_sys_sched_getaffinity(compat_pid_t pid, unsigned int len, ...@@ -425,9 +425,11 @@ asmlinkage int compat_sys_sched_getaffinity(compat_pid_t pid, unsigned int len,
&kernel_mask); &kernel_mask);
set_fs(old_fs); set_fs(old_fs);
if (ret > 0) if (ret > 0) {
ret = sizeof(compat_ulong_t);
if (put_user(kernel_mask, user_mask_ptr)) if (put_user(kernel_mask, user_mask_ptr))
return -EFAULT; return -EFAULT;
}
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment