# VERDICT -- DF-2022 (Low)

**Verdict:** REPRODUCED (source-only)

**Impact:** dos (unkillable D-state hang); HW-gated (needs amdgpu VF/SR-IOV), source-confirmed

**Confidence:** likely

## Mechanism (source-traced)

xgpu_ai_mailbox_trans_msg (mxgpu_ai.c:128-135) has a 'do { set_valid(false); trn=peek_ack(); if(trn){pr_err;msleep(1);} } while(trn)' loop with NO timeout and NO signal-pending check, unlike every sibling poll in the file (poll_ack at :79-96 bounded by AI_MAILBOX_POLL_ACK_TIMEDOUT, poll_msg at :98-114 bounded). peek_ack (mxgpu_ai.c:75-77) returns the host-driven TRN_MSG_ACK bit, so the loop only exits when the host deasserts it. msleep maps to tsleep flags=0 (no PCATCH) so SIGKILL cannot recover -- permanent unkillable D-state if host/PF leaves ACK asserted.

## Why not runtime-reproduced

The guest (DragonFlyBSD 6.5-DEVELOPMENT #0 master DEV, KVM) has NO matching
hardware: pciconf shows no mfi/tws/iir RAID controller and no amdgpu/DRM GPU;
the driver therefore cannot attach and the vulnerable path is not runtime-
triggerable here. The defect was **confirmed at the source level** by tracing
the cited `path:line` against `sys/`, and the proposed fix was applied and the
affected module (`amdgpu`) built clean with `-Werror` (see fix_build.log).

## Fix

mxgpu_ai.c:128-135: bound the loop with a counter (r = AI_MAILBOX_POLL_ACK_TIMEDOUT; ... while(trn && r-- > 0)) mirroring poll_ack/poll_msg, so a stuck ACK cannot wedge an unkillable thread forever.

The standalone, git-apply-able diff is `fix.diff`.
