From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: accel/amdxdna: Fix NULL pointer dereference of mgmt_chann Date: Fri, 27 Feb 2026 11:41:38 +1000 Message-ID: In-Reply-To: <20260226213857.3068474-1-lizhi.hou@amd.com> References: <20260226213857.3068474-1-lizhi.hou@amd.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: accel/amdxdna: Fix NULL pointer dereference of mgmt_chann Author: Lizhi Hou Patches: 1 Reviewed: 2026-02-27T11:41:38.362578 --- This is a single-patch fix for a NULL pointer dereference in the `accel/amdxdna` driver. The bug is real: if `aie2_send_mgmt_msg_wait()` times out (`-ETIME`), it sets `ndev->mgmt_chann = NULL`, and a subsequent call to `aie2_hw_stop()` will pass that NULL pointer to `xdna_mailbox_stop_channel()` and `xdna_mailbox_destroy_channel()`, causing a crash. The approach of extracting a helper with a NULL guard is sound, but the `drm_WARN_ON` lock assertion introduced in the helper may be too strong for all call sites. --- Generated by Claude Code Patch Reviewer