diff options
author | Michael Kerrisk <[email protected]> | 2014-05-09 16:54:15 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2014-05-22 10:21:25 +0200 |
commit | 143cf23df25b7082cd706c3c53188e741e7881c3 (patch) | |
tree | 6b0172d834371ac49279a96e1e1f53766009988d /net/unix/af_unix.c | |
parent | 2b4cfe64dee0d84506b951d81bf55d9891744d25 (diff) |
sched: Make sched_setattr() correctly return -EFBIG
The documented[1] behavior of sched_attr() in the proposed man page text is:
sched_attr::size must be set to the size of the structure, as in
sizeof(struct sched_attr), if the provided structure is smaller
than the kernel structure, any additional fields are assumed
'0'. If the provided structure is larger than the kernel structure,
the kernel verifies all additional fields are '0' if not the
syscall will fail with -E2BIG.
As currently implemented, sched_copy_attr() returns -EFBIG for
for this case, but the logic in sys_sched_setattr() converts that
error to -EFAULT. This patch fixes the behavior.
[1] http://thread.gmane.org/gmane.linux.kernel/1615615/focus=1697760
Signed-off-by: Michael Kerrisk <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions