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/lima: call drm_mm_init() with a valid allocation range Date: Thu, 04 Jun 2026 14:10:22 +1000 Message-ID: In-Reply-To: <20260601-lima-alloc-fix-v1-1-16d3f3b7b780@axis.com> References: <20260601-lima-alloc-fix-v1-1-16d3f3b7b780@axis.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm/lima: call drm_mm_init() with a valid allocation range Author: Henrik Grimler Patches: 2 Reviewed: 2026-06-04T14:10:22.015325 --- This is a single-patch fix for a real bug in the lima driver where `lima_vm= _create()` is called before `ldev->va_start` and `ldev->va_end` are initial= ized, resulting in `drm_mm_init()` being called with a zero-size range. Wit= h `DRM_DEBUG_MM` enabled, this triggers a `BUG_ON`. The diagnosis and fix d= irection are correct =E2=80=94 moving `lima_vm_create()` after the VA range= setup is the right thing to do. However, **the patch introduces a resource leak on the error path for mali4= 50 devices**. The error goto labels are not updated to match the new initia= lization order, so a `lima_vm_create()` failure on mali450 will leak the `d= lbu_cpu` DMA allocation. --- Generated by Claude Code Patch Reviewer