Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | From | Thadeu Lima de Souza Cascardo <> | Subject | [PATCH 1/2] sched: sched_getattr should return E2BIG, not EFBIG | Date | Tue, 3 Sep 2019 14:16:44 -0300 |
| |
As documented and the behavior before commit 22400674945c (sched: Simplify return logic in sched_read_attr()), sched_getattr should return E2BIG instead of EFBIG when there is not enough space to copy sched_attr.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Fixes: 22400674945c (sched: Simplify return logic in sched_read_attr()) --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 2477893dd069..0fd67281e656 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5129,7 +5129,7 @@ static int sched_read_attr(struct sched_attr __user *uattr, for (; addr < end; addr++) { if (*addr) - return -EFBIG; + return -E2BIG; } attr->size = usize; -- 2.20.1
| ![\](/images/icornerr.gif) |