diff options
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index f66920173370..1f3e19fd6dc6 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -4450,7 +4450,7 @@ static int sched_copy_attr(struct sched_attr __user *uattr, struct sched_attr *a | |||
4450 | u32 size; | 4450 | u32 size; |
4451 | int ret; | 4451 | int ret; |
4452 | 4452 | ||
4453 | if (!access_ok(VERIFY_WRITE, uattr, SCHED_ATTR_SIZE_VER0)) | 4453 | if (!access_ok(uattr, SCHED_ATTR_SIZE_VER0)) |
4454 | return -EFAULT; | 4454 | return -EFAULT; |
4455 | 4455 | ||
4456 | /* Zero the full structure, so that a short copy will be nice: */ | 4456 | /* Zero the full structure, so that a short copy will be nice: */ |
@@ -4650,7 +4650,7 @@ static int sched_read_attr(struct sched_attr __user *uattr, | |||
4650 | { | 4650 | { |
4651 | int ret; | 4651 | int ret; |
4652 | 4652 | ||
4653 | if (!access_ok(VERIFY_WRITE, uattr, usize)) | 4653 | if (!access_ok(uattr, usize)) |
4654 | return -EFAULT; | 4654 | return -EFAULT; |
4655 | 4655 | ||
4656 | /* | 4656 | /* |