summaryrefslogtreecommitdiff
path: root/sound/arm/pxa2xx-ac97-lib.c
diff options
context:
space:
mode:
authorKui-Feng Lee <kuifeng@meta.com>2022-12-16 14:18:54 -0800
committerAlexei Starovoitov <ast@kernel.org>2022-12-28 14:11:48 -0800
commit7ff94f276f8ea05df82eb115225e9b26f47a3347 (patch)
tree66ab8a720acbe92e8d791ad5ae383d9ed6fce1fe /sound/arm/pxa2xx-ac97-lib.c
parent8f161ca1105a6af6614333f13aa7be4aab8b633a (diff)
bpf: keep a reference to the mm, in case the task is dead.
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@kernel.org> Signed-off-by: Song Liu <song@kernel.org> Signed-off-by: Kui-Feng Lee <kuifeng@meta.com> Reported-by: Nathan Slingerland <slinger@meta.com> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/r/20221216221855.4122288-2-kuifeng@meta.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'sound/arm/pxa2xx-ac97-lib.c')
0 files changed, 0 insertions, 0 deletions