* Mikulas Patocka <[email protected]> [260104 16:18]: > If the process was killed by a fatal signal, amdgpu_hmm_register could > return -EINTR (the -EINTR comes from mm_take_all_locks). > > Don't log the error in this case, because no error happened. > > Signed-off-by: Mikulas Patocka <[email protected]> > > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > Index: mm/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c > =================================================================== > --- mm.orig/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 2026-01-04 > 21:19:14.000000000 +0100 > +++ mm/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c 2026-01-04 > 21:19:14.000000000 +0100 > @@ -1070,8 +1070,13 @@ static int init_user_pages(struct kgd_me > > ret = amdgpu_hmm_register(bo, user_addr); > if (ret) { > - pr_err("%s: Failed to register MMU notifier: %d\n", > - __func__, ret); > + /* > + * If we got EINTR because the process was killed, don't report > + * it, because no error happened. > + */ > + if (!(fatal_signal_pending(current) && ret == -EINTR)) > + pr_err("%s: Failed to register MMU notifier: %d\n", > + __func__, ret);
Masking off error messages will make the message less useful and harder to debug. You could also change the log level, which might be more desirable for a whole lot of the messages in here? Thanks, Liam
