From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/xe/drm_ras: Make counter allocation drm managed Date: Thu, 04 Jun 2026 13:22:00 +1000 Message-ID: In-Reply-To: <20260602044919.702209-3-raag.jadav@intel.com> References: <20260602044919.702209-1-raag.jadav@intel.com> <20260602044919.702209-3-raag.jadav@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Verdict: Correct.** Switching from `kcalloc` to `drmm_kcalloc` for the counter array ensures th= e counter memory is freed during DRM device teardown even if `cleanup_node_= param()` is never called for a particular severity level. This fixes the le= ak where a failure on node N left node N-1's counter memory orphaned (since= `cleanup_node_param` was only invoked for the failing node, not previously= -successful ones). The corresponding removal of `kfree(ras->info[severity])` from `cleanup_nod= e_param` is correct =E2=80=94 double-freeing drmm-managed memory would corr= upt the allocator. The `ras->info[severity] =3D NULL` is retained, which pr= events stale pointer dereferences. No issues. --- --- Generated by Claude Code Patch Reviewer