|
@@ -314,7 +314,9 @@ static int proc_oom_score(struct task_struct *task, char *buffer)
|
|
struct timespec uptime;
|
|
struct timespec uptime;
|
|
|
|
|
|
do_posix_clock_monotonic_gettime(&uptime);
|
|
do_posix_clock_monotonic_gettime(&uptime);
|
|
|
|
+ read_lock(&tasklist_lock);
|
|
points = badness(task, uptime.tv_sec);
|
|
points = badness(task, uptime.tv_sec);
|
|
|
|
+ read_unlock(&tasklist_lock);
|
|
return sprintf(buffer, "%lu\n", points);
|
|
return sprintf(buffer, "%lu\n", points);
|
|
}
|
|
}
|
|
|
|
|