From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39E3B44E047 for ; Fri, 15 May 2026 12:42:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778848952; cv=none; b=M3/cX/U08+3tHPa7mzukdmateITgvakJad2mnTi7elNlfoOjBaHYGllNxlb/pYeLSQP0KYVSoWDAw+j6SsWe5+88tejMmRAbWUjBO+jJ+2Kq80TACb6qYpQpIhi0pvStyV44mRqMW079+U6MZ6Z3kDZak8ihssJ9A4sUED64kyg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778848952; c=relaxed/simple; bh=fKYBDJdXDp67Zr7KM8kkWqEN84dwC5WY1qu6gcK8d+U=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=kznQaRgyihYBmm9yReMD1Y8rByyvR0dOrq9rh37lEzaoSGLUro254dHAg/Ewe2W7mDHZY+4dX7QhIWL6bHR8ENfPEmxkmUTtjjFsSSVt8dUU9TZyEXqkDyDd99/BBRsL8SENJ9Jm9Zt8z4xJpplRHwReCF8T/rcVBbeYMzCYlpU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=G0kVlfhy; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=cf3mspjL; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="G0kVlfhy"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="cf3mspjL" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64FAt0Kv1847947 for ; Fri, 15 May 2026 12:42:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=mNVZHM0vaurUkrmXeKukxyvOImFgIrlQCkN FvjRNZcI=; b=G0kVlfhyY2obMrR3HkjqumwaD28g+4iaT9Nv0FC1yqQmymYXDac 54JFDhVgmkPjZ8J6NgyuPJBog41YPfXH6ik6oMQwcVYwxKLhJflF+lWfUhgbNekB CYZDG8ms356a9YjRxXTWBLnkfeXw6mNCiSbiRAiJND+fq6x2sSD7XO7dpu5Ipywc 32lU5cq4GMlGdFH36igqoQmUSVG8bfKFgoz1s6cPyrcU9TzTHDDNQo9neG289NPa yoxokS5USGbls29t5pBYqLsG6cfYTOXAPn0oQ+qilvdhiV5T1Z38Av/ZMlLVDIbZ +4sYi6OX8JTggvOoTuW42QPgXbDDEvHjkkg== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1t37ct-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 12:42:30 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2baf7748d0aso84747575ad.1 for ; Fri, 15 May 2026 05:42:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778848949; x=1779453749; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mNVZHM0vaurUkrmXeKukxyvOImFgIrlQCkNFvjRNZcI=; b=cf3mspjLi4BNuWnoFpnZZv+J3vrD68jpJOcfTid2tdZEX4P209y1Laue3Gz8fv6MCW uinPVaaHMgge118VNPDAcBmVDz9hc/Vm3ql/4X1EJZCHOw8TtMjkrAghZrtk9R24ibCb vTT7zpe3FBcYoC2zUHWEyu6RSHC3GrWr0jnHx5tH293Vr/MRB3CyiB1vp9p5fzjJAhPk Jvs4nohkUaf8C3i18CxzOhxm+OZhXmnYpqT17dxp7r4r7zRKDBmzT5wA5vFqcgRbbUka w0rOrbMWzoa11KCLskEebx+CZcX/AgZ1qk3ZjDF1LiruA1ArBq7Ag1IrucCqc6qY1mnh qp1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778848949; x=1779453749; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mNVZHM0vaurUkrmXeKukxyvOImFgIrlQCkNFvjRNZcI=; b=E5pHmdxoYNxZYArxCyaxhMQ8ydfh/DK16qIOuce3y+Bytz9ltSAdwTXrsqmgcRseYI xycxTC8UmjLunn8B4k2yBPjVmVFLsKQoj+C2LdgHV0E1U0Mdu2NJbWX1jRpoVOVGBDT2 21lb4rPc9YRdQ5/bBTsYklDsY0Sg+s3c+9I6PR5LfIKqwxVOI/oDJaW6A/VAwmCchFLY 50lPJUW7SNE8pLMYk71RUBu1P+nE58RSCHchfbXYqk9lvmQXSvwbVUfW2FsYR4Zq74fT fuLOgJrMlS4TDw2Rtf3jENW7rhmohEBZjdGX8+z0JfJRjSgM+Is8NLHgh3HVRdoAOz6G dbvA== X-Forwarded-Encrypted: i=1; AFNElJ8NTGMzJMiQiOCqxtrhk4IOUESdtBagT7ZFqns/kMLZMXELPGLsU1w9oiqDtTcriGTbPGyxs94HJM00JqI=@vger.kernel.org X-Gm-Message-State: AOJu0YwNxNRQpbXu1oTbS2nh2ngpWpHIo0WtiDsaV1xW7OEr37QC7dJo q+gmSMKPFlITNpv4a7OQ7kNvoGoiT4/C9Mnpn/25WudgaWwwlCiDJA14vKNOvKDt7PuwyJ1utlx LVtuzfZyXsxnt8TJOeZl+lc00naICeKYQ62zgWbwuRujlFB3YQIAEIRwBD5NtDAhzibQ= X-Gm-Gg: Acq92OHBMkTUfUvXBqAOWy8V1IBhqj7m3MWkEmmCyHr9qCFpLrOK1/R3VuGTdBOLlLA CdcO3yD4RA/jCdvypweOxnWweGa7G0yFd04zp1DX3KJXaeZ7/pjbVGx1IG24muPxLKyCnYffBK4 6rbFMtShcucujD5iDFLGrrVG1iQnljJd86i62lPfcFBDKCOZ145ErVUrqujboPAOVn1ffab3Hsn KM0KxuaRzRVNd4ybEjileQB1X11AByVbTOyyVTJpa9eRG6Ta/fy9LXMyTT0jcWcLxb3c5D2phwS okkiHwjLP1ATWmScUc0AuJtGjHYmIkedCR/h+y8IoFAaPEfbEGBpoZFYUzHADmVFPcOpZ70kO7C 2EfEV8EzluhpwNZ9NfPU+wjC2BLDhddB7XN6JmOgBNHIhdy6dwwfI4TmEceweamGRDnwb8xKtlv UQHf0y2cV7NL+7Hm2rkTs= X-Received: by 2002:a17:903:3c28:b0:2ba:bfb5:9cc with SMTP id d9443c01a7336-2bd7e8d3b9fmr45082005ad.26.1778848949215; Fri, 15 May 2026 05:42:29 -0700 (PDT) X-Received: by 2002:a17:903:3c28:b0:2ba:bfb5:9cc with SMTP id d9443c01a7336-2bd7e8d3b9fmr45081585ad.26.1778848948761; Fri, 15 May 2026 05:42:28 -0700 (PDT) Received: from QCOM-SocCW5bzXR.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2bd5c05f27csm56119395ad.25.2026.05.15.05.42.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 05:42:28 -0700 (PDT) From: Jianping Li To: srini@kernel.org, amahesh@qti.qualcomm.com, arnd@arndb.de, gregkh@linuxfoundation.org, abelvesa@kernel.org, jorge.ramirez-ortiz@linaro.org Cc: Jianping Li , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, ekansh.gupta@oss.qualcomm.com, quic_chennak@quicinc.com Subject: [PATCH v5 0/5] misc: fastrpc: Add missing bug fixes Date: Fri, 15 May 2026 20:42:12 +0800 Message-Id: <20260515124217.20723-1-jianping.li@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=D7Z37PRj c=1 sm=1 tr=0 ts=6a0714b6 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=mSfM1xQJxAVIrMv2y48A:9 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDEyOSBTYWx0ZWRfX5qQ1DOs7HKDj GDexLbnx73qJCuy3T+twGElnwQllCTaEGmmbZdDkx5n+zrKbWSmh2Yc4ajS0vvjqukjdwSDgupQ i+ErZ0bKmO5mvw1pO7BYq6jHMN94uHDiYK7kAORn68vMbwnexZrOISrRpbcPXdJdR8Ht2Yjdz/+ vW0miPFiJ+b3wsyzeuTFtS0Al2hKmeUgFG4OhckkAj7fHSA40umRVA3rol62RvY7567pBnQOFjp lm1/IqaPikC1aPq1gBaojfcTfki+pti0GFEQJ7G9IpDxlgLXevBXZi5Px7+qg5MgvHPoq4tDyPn +FP91EgqZW2g4EKGdqbEFAtctDekYA/l1KisYkcT++e4DJHTgCZbDpCo5khBdNnrrEZoBafIF9z zbDc//5dFDX9BZDT9gRYtDpmzzrgDXw67wOxPsS1IKvZke0Nlw8wcSe/JVEIH/Mn0rE+3gH47FM An+VOd6JqfxMtDLThgQ== X-Proofpoint-ORIG-GUID: owQ-9JJOBFeRSpKBgPqSo615pxRUvEzm X-Proofpoint-GUID: owQ-9JJOBFeRSpKBgPqSo615pxRUvEzm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-15_03,2026-05-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 adultscore=0 phishscore=0 clxscore=1015 bulkscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605150129 Add missing bug fixes in memory areas. This patch series fixes multiple memory handling issues in the FastRPC driver, primarily around the Audio PD remote heap. The Audio PD uses a reserved memory-region that is shared between HLOS and the DSP. Allocating and freeing this memory from userspace is unsafe, as the kernel cannot reliably determine when the DSP has finished using the buffers. To address this, the entire reserved memory-region for the Audio PD is now fully assigned to the DSP during remoteproc boot-up, and its lifetime is tied to the rpmsg channel. Patch [v4]: https://lore.kernel.org/all/20260409062617.1182-1-jianping.li@oss.qualcomm.com/ Change in v5: - Split reserved-memory handling into separate patches Change in v4: - Fail Audio PD static process creation when no reserved memory-region is present, instead of silently proceeding Change in v3: - Adjusted the order of the series, placing NULL check changes that are not bug fixes at the end - Modified the commit message to describe the bug background in detail - Switch buf->list_lock back to fl->lock - Add locking to the operation of audio_init_mem Changes in v2: - Remove the if check outside fastrpc_buf_free - Store the spinlock pointer in the struct fastrpc_buf instead - Allocate entire reserved memory to audio PD through remote heap Ekansh Gupta (3): misc: fastrpc: Fix initial memory allocation for Audio PD memory pool misc: fastrpc: Remove buffer from list prior to unmap operation misc: fastrpc: Allow fastrpc_buf_free() to accept NULL Jianping Li (2): misc: fastrpc: Fail Audio PD init when reserved memory is missing misc: fastrpc: Allocate entire reserved memory for Audio PD in probe drivers/misc/fastrpc.c | 135 ++++++++++++++++++++++------------------- 1 file changed, 71 insertions(+), 64 deletions(-) -- 2.43.0