Re: [PATCH] mm/oom_kill: fix wild pointer in out_of_memory

2021-03-15 Thread Michal Hocko
On Sat 13-03-21 12:23:00, Jiang Biao wrote: > From: Bin Lai > > From: Bin Lai > > The oc->chosen is used by oom implementation, and the caller does > not initialize this variable. If the tasks of memcg are all unkillable, > oom_evaluate_task cann't choose any task, and the oc->chosen will be >

[PATCH] mm/oom_kill: fix wild pointer in out_of_memory

2021-03-12 Thread Jiang Biao
From: Bin Lai From: Bin Lai The oc->chosen is used by oom implementation, and the caller does not initialize this variable. If the tasks of memcg are all unkillable, oom_evaluate_task cann't choose any task, and the oc->chosen will be a wild pointer. So we should initialize oc->chosen before