Files
ack-tegra/mm
Mayank Rungta db2acc01b7 ANDROID: mm: Make dump_tasks() safe in NMI context
dump_tasks() can be called from NMI context to dump memory status of all
tasks. However, calling from NMI context has safety issues:
1. find_lock_task_mm() acquires task_lock(t) using spin_lock(), which
   is not NMI-safe and can deadlock if alloc_lock is held when NMI fires.
2. mem_cgroup_scan_tasks() traverses memcg structures and takes locks
   that are not NMI-safe.

Fix these by:
- Using spin_trylock(&t->alloc_lock) in find_lock_task_mm() when in_nmi().
- Returning early if a memcg oom dump is requested in NMI context.

Fixes: 4df28ddcd9 ("ANDROID: mm: export dump_tasks symbol.")
Bug: 538262381
Change-Id: I8b79213015fde74b81427d44f122296c5e0edaf9
Signed-off-by: Mayank Rungta <mrungta@google.com>
2026-08-14 09:44:08 -07:00
..
…
2025-11-20 13:43:57 -08:00
…
…
…
2026-06-02 16:29:16 +01:00
…
2025-09-13 16:55:07 -07:00
…
…
…
2026-05-29 05:34:24 -06:00
…
…