提交 d668f5ea 编写于 作者: Y Yu Jiahua 提交者: Zheng Zengkai

sched: Access control for sysctl_update_load_latency

hulk inclusion
category: feature
bugzilla: 175551 https://gitee.com/openeuler/kernel/issues/I4DDEL

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

Add access control for sysctl_update_load_latency
Signed-off-by: NYu Jiahua <yujiahua1@huawei.com>
Reviewed-by: NChen Hui <judy.chenhui@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 9c5d703a
...@@ -52,6 +52,9 @@ int sysctl_update_load_latency(struct ctl_table *table, int write, ...@@ -52,6 +52,9 @@ int sysctl_update_load_latency(struct ctl_table *table, int write,
int latency = sysctl_load_tracking_latency; int latency = sysctl_load_tracking_latency;
struct ctl_table t; struct ctl_table t;
if (write && !capable(CAP_SYS_ADMIN))
return -EPERM;
t = *table; t = *table;
t.data = &latency; t.data = &latency;
t.extra1 = &min; t.extra1 = &min;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册