mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
memcg: use find_lock_task_mm() in memory cgroups oom
When the OOM killer scans task, it check a task is under memcg or not when it's called via memcg's context. But, as Oleg pointed out, a thread group leader may have NULL ->mm and task_in_mem_cgroup() may do wrong decision. We have to use find_lock_task_mm() in memcg as generic OOM-Killer does. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
73045c47b6
commit
158e0a2d1b
3 changed files with 10 additions and 4 deletions
|
@ -66,6 +66,8 @@ static inline void oom_killer_enable(void)
|
|||
extern unsigned long badness(struct task_struct *p, struct mem_cgroup *mem,
|
||||
const nodemask_t *nodemask, unsigned long uptime);
|
||||
|
||||
extern struct task_struct *find_lock_task_mm(struct task_struct *p);
|
||||
|
||||
/* sysctls */
|
||||
extern int sysctl_oom_dump_tasks;
|
||||
extern int sysctl_oom_kill_allocating_task;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue