From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: misc: fastrpc: Add missing bug fixes Date: Thu, 04 Jun 2026 13:11:15 +1000 Message-ID: In-Reply-To: <20260602071750.526-1-jianping.li@oss.qualcomm.com> References: <20260602071750.526-1-jianping.li@oss.qualcomm.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: misc: fastrpc: Add missing bug fixes Author: Jianping Li Patches: 8 Reviewed: 2026-06-04T13:11:15.093832 --- This is a v7 series of 5 patches fixing memory handling bugs in the FastRPC driver, specifically around Audio PD (Processing Domain) remote heap management. The overall goal is sound: the Audio PD's reserved memory region should be fully assigned to the DSP at probe time, with its lifetime tied to the rpmsg channel, rather than allowing unsafe userspace-controlled alloc/free. The series is generally well-structured with a logical progression: fix the initial allocation bug (patch 1), fix a race in unmap (patch 2), add validation (patch 3), move allocation to probe (patch 4), and a cleanup (patch 5). However, there are several issues, most notably in patches 3 and 4, that need attention before this can be merged. **Key concerns:** - Patch 3's validation check is placed before `remote_heap` has been allocated (in the pre-patch-4 code), making it dead code or an unconditional failure depending on ordering - Patch 4 has a memory leak on the error path when `kzalloc` succeeds but `qcom_scm_assign_mem` fails in probe - Patch 4's removal cleanup only `kfree`s `remote_heap` but the ADSP path never called `fastrpc_remote_heap_alloc`/`__fastrpc_buf_alloc`, so there's no DMA mapping to tear down - this is correct but should be documented --- --- Generated by Claude Code Patch Reviewer