Re: [PATCH v5 2/2] drm/amdgpu: fix recursive ww_mutex acquire in amdgpu_devcoredump_format

From: Mikhail Gavrilov

Date: Fri May 22 2026 - 04:31:52 EST


Thanks for the review. v6 will:

- trim the commit message: drop the reproducer paragraph, keep just
the problem description and the solution
- move the IB dumping into its own function
- replace the break-based flow inside drm_exec_until_all_locked() with
goto error handling, and drop the now-superfluous `locked` variable
- not call drm_exec_fini() in the locking helper on the error path

One thing I'd like to confirm before respinning — the !mapping case in
the locking loop:

mapping = amdgpu_vm_bo_lookup_mapping(vm, pfn);
if (!mapping)
continue;

You commented "That's also an error, it could be that we just want to
print the IB start address in that case."

My reading: a missing mapping is not fatal to the whole dump. For that
IB there is simply nothing to lock, so the locking loop should move on
to the next IB, and the content loop then still emits the
"IB #N 0x<addr> <dw>" header with no body (it already does this via
goto output_ib_content). The dump continues for the remaining IBs.

So in the locking loop I'd keep `continue` for !mapping, and reserve
goto-abort only for real errors (drm_exec_lock_obj() failure, VM not
found). Is that what you intended, or should a missing mapping abort
the whole IB dump?

--
Thanks,
Mike.