From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: Fix leaking of cached Host1x buffer objects Date: Sat, 16 May 2026 10:12:28 +1000 Message-ID: In-Reply-To: <20260515-host1x-bocache-leak-v1-0-a0375f68aeab@nvidia.com> References: <20260515-host1x-bocache-leak-v1-0-a0375f68aeab@nvidia.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: Fix leaking of cached Host1x buffer objects Author: Mikko Perttunen Patches: 3 Reviewed: 2026-05-16T10:12:28.032839 --- This is a well-reasoned 2-patch series from Mikko Perttunen fixing a real m= emory leak in the Host1x buffer object cache. The core problem is a classic= circular reference: cached mappings hold a refcount on the BO, but the onl= y way to release a cached mapping is through the BO's free path =E2=80=94 w= hich never runs because the cache keeps the BO alive. The fix is clean: centralize BO refcounting in the common `host1x_bo_pin()`= /`host1x_bo_unpin()` functions rather than in each driver's `.pin`/`.unpin`= callbacks, and make the cache's reference to the BO "weak" (no refcount bu= mp). The BO free path is then responsible for tearing down cached mappings = via a new `host1x_bo_clear_cached_mappings()` helper. The series is correct and the approach is sound. I have one concern about t= he direct invocation of `__host1x_bo_unpin` bypassing `kref_put` in the tea= rdown path, and a minor locking observation, but nothing blocking. **Verdict: Looks good overall. Two minor observations below, neither blocki= ng.** --- --- Generated by Claude Code Patch Reviewer