From e5882583019dd1179aa6182314b3fb354b603186 Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Mon, 2 Apr 2018 14:03:23 -0700 Subject: Revert "fixup! proc: make oom adjustment files user read-only" CTS no longer expects oom_{adj,score_adj} to be read-only. See https://android-review.googlesource.com/530687/ for additional context. This reverts commit 87a7a2cfbe48c29e48ed846d939f82d710780d99. Bug: 63142211 Change-Id: I1d1b33c93ca6b6c16a9c1d5430dcb5cbe3ec894c Signed-off-by: Greg Hackmann --- fs/proc/base.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/proc/base.c') diff --git a/fs/proc/base.c b/fs/proc/base.c index 247ed9b0786f..f558b4bd5d6a 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2877,6 +2877,7 @@ static const struct pid_entry tgid_base_stuff[] = { ONE("cgroup", S_IRUGO, proc_cgroup_show), #endif ONE("oom_score", S_IRUGO, proc_oom_score), + INF("oom_score", S_IRUGO, proc_oom_score), REG("oom_adj", S_IRUSR, proc_oom_adj_operations), REG("oom_score_adj", S_IRUSR, proc_oom_score_adj_operations), #ifdef CONFIG_AUDITSYSCALL -- cgit v1.2.3 From 4f175e7cd92d15232200a614894761695e87a702 Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Mon, 2 Apr 2018 14:03:43 -0700 Subject: Revert "proc: make oom adjustment files user read-only" CTS no longer expects oom_{adj,score_adj} to be read-only. See https://android-review.googlesource.com/530687/ for additional context. This reverts commit 55541f1ac36fbb6edd94273cab21d69a82d31519. Bug: 63142211 Change-Id: I8011b4389b17d9577a6aff08943d0021e990171b Signed-off-by: Greg Hackmann --- fs/proc/base.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'fs/proc/base.c') diff --git a/fs/proc/base.c b/fs/proc/base.c index f558b4bd5d6a..440ec5f00214 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2877,9 +2877,8 @@ static const struct pid_entry tgid_base_stuff[] = { ONE("cgroup", S_IRUGO, proc_cgroup_show), #endif ONE("oom_score", S_IRUGO, proc_oom_score), - INF("oom_score", S_IRUGO, proc_oom_score), - REG("oom_adj", S_IRUSR, proc_oom_adj_operations), - REG("oom_score_adj", S_IRUSR, proc_oom_score_adj_operations), + REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adj_operations), + REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations), #ifdef CONFIG_AUDITSYSCALL REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations), REG("sessionid", S_IRUGO, proc_sessionid_operations), @@ -3272,8 +3271,8 @@ static const struct pid_entry tid_base_stuff[] = { ONE("cgroup", S_IRUGO, proc_cgroup_show), #endif ONE("oom_score", S_IRUGO, proc_oom_score), - REG("oom_adj", S_IRUSR, proc_oom_adj_operations), - REG("oom_score_adj", S_IRUSR, proc_oom_score_adj_operations), + REG("oom_adj", S_IRUGO|S_IWUSR, proc_oom_adj_operations), + REG("oom_score_adj", S_IRUGO|S_IWUSR, proc_oom_score_adj_operations), #ifdef CONFIG_AUDITSYSCALL REG("loginuid", S_IWUSR|S_IRUGO, proc_loginuid_operations), REG("sessionid", S_IRUGO, proc_sessionid_operations), -- cgit v1.2.3