On 12/15/22 5:59 PM, Kui-Feng Lee wrote:
Fix the system crash that happens when a task iterator travel through vma of tasks. In task iterators, we used to access mm by following the pointer on the task_struct; however, the death of a task will clear the pointer, even though we still hold the task_struct. That can cause an unexpected crash for a null pointer when an iterator is visiting a task that dies during the visit. Keeping a reference of mm on the iterator ensures we always have a valid pointer to mm. Co-developed-by: Song Liu <song@xxxxxxxxxx> Signed-off-by: Song Liu <song@xxxxxxxxxx> Signed-off-by: Kui-Feng Lee <kuifeng@xxxxxxxx> Reported-by: Nathan Slingerland <slinger@xxxxxxxx>
Acked-by: Yonghong Song <yhs@xxxxxx>