Re: [PATCH] sched/numa: Fix NULL pointer access to mm_struct durng task swap

From: Peter Zijlstra
Date: Thu Jul 03 2025 - 07:55:20 EST


On Thu, Jul 03, 2025 at 01:51:23PM +0200, Michal Hocko wrote:
> Why not use find_lock_task_mm if task_lock is acceptable for this code
> path?

Having to take locks just to count a number nobody is ever going to look
at is silly. Iterating the whole thread group (might be hundreds or
thousands of tasks) just to maybe find one when racing with a fatal
signal is even more silly.