Commit ca2a459c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fix return of compat_sys_sched_getaffinity

From: rwhron@earthlink.net

It returns sizeof(compat_ulong_t) even if put_user() faulted.
parent 2f20d8da
......@@ -425,11 +425,9 @@ asmlinkage int compat_sys_sched_getaffinity(compat_pid_t pid, unsigned int len,
&kernel_mask);
set_fs(old_fs);
if (ret > 0) {
if (ret > 0)
if (put_user(kernel_mask, user_mask_ptr))
ret = -EFAULT;
ret = sizeof(compat_ulong_t);
}
return -EFAULT;
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