In Linux, exit_mm() clears task->mm early in do_exit(), so
get_task_mm() returns NULL once a task has started to exit. Drivers
rely on this to stop deferred work for a dying process: amdgpu's
userptr restore worker and the amdkfd SVM restore/deferred-list workers
look up the task, call get_task_mm() and bail out if it fails.
The LinuxKPI version kept returning the mm until the task_struct was
freed, so those workers kept operating on a process whose address space
was being torn down; amdgpu logged "Failed to resume KFD" on every exit
of a process with userptr BOs because the KFD process was already gone.
Return NULL when the process has P_WEXIT set, using the existing
linux_task_exiting().
Tested on amdgpu (gfx1151) with the ROCm userptr and SVM tests.