OSDN Git Service

Revert "ANDROID: proc: make oom adjustment files user read-only"
authorGreg Hackmann <ghackmann@google.com>
Tue, 7 Nov 2017 21:21:20 +0000 (13:21 -0800)
committerGreg Hackmann <ghackmann@google.com>
Fri, 13 Apr 2018 22:22:23 +0000 (22:22 +0000)
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 2956c9be7e5a8a2a89e790e20d2953b490571a4c.

Bug: 63142211
Change-Id: I9ff2728531eb2b09b5ddb19da51eacf6e4316dd6
Signed-off-by: Greg Hackmann <ghackmann@google.com>
fs/proc/base.c

index f7b394a..3a60e67 100644 (file)
@@ -2913,9 +2913,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),
@@ -3308,8 +3307,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),