Skip to content
Snippets Groups Projects
Commit 6df59de0 authored by Ma Wupeng's avatar Ma Wupeng Committed by Zheng Zengkai
Browse files

mm: reliable: Fix ret errno to EACCES

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S


CVE: NA

--------------------------------

Commit bc25b308 ("mm: reliable: Use EINVAL in reliable_check") update
EPERM to EINVAL try to pass LTP's proc01 test, however LTP only treat
EACCESS as whitelist in the scenario.

To solve this problem, update EINVAL to EACCESS.

Fixes: bc25b308 ("mm: reliable: Use EINVAL in reliable_check")

Signed-off-by: default avatarMa Wupeng <mawupeng1@huawei.com>
Reviewed-by: default avatarChen Wandun <chenwandun@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent bc25b308
No related branches found
Tags 5.10.0-106.18.0
No related merge requests found
......@@ -1264,7 +1264,7 @@ static const struct file_operations proc_oom_score_adj_operations = {
static inline int reliable_check(struct task_struct *task, struct pid *pid)
{
if (!mem_reliable_is_enabled())
return -EINVAL;
return -EACCES;
if (is_global_init(task))
return -EINVAL;
......
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