sched_getaffinity(): return EINVAL for 0 lenght request (fixes LTP sched_getaffinity01)
This commit is contained in:
@@ -4832,6 +4832,9 @@ SYSCALL_DECLARE(sched_getaffinity)
|
|||||||
unsigned long irqstate;
|
unsigned long irqstate;
|
||||||
extern int num_processors;
|
extern int num_processors;
|
||||||
|
|
||||||
|
if (!len)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
len = MIN2(len, sizeof(k_cpu_set));
|
len = MIN2(len, sizeof(k_cpu_set));
|
||||||
|
|
||||||
if(tid == 0)
|
if(tid == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user