提交 6df59de0 编写于 作者: M Ma Wupeng 提交者: Zheng Zengkai

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: NMa Wupeng <mawupeng1@huawei.com>
Reviewed-by: NChen Wandun <chenwandun@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 bc25b308
...@@ -1264,7 +1264,7 @@ static const struct file_operations proc_oom_score_adj_operations = { ...@@ -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) static inline int reliable_check(struct task_struct *task, struct pid *pid)
{ {
if (!mem_reliable_is_enabled()) if (!mem_reliable_is_enabled())
return -EINVAL; return -EACCES;
if (is_global_init(task)) if (is_global_init(task))
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册