From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 7280030C63A for ; Thu, 9 Apr 2026 06:26:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775715988; cv=none; b=uhOHLyBLYqMzZ8kbD7eHh+WMr1D2xfk/CIaC8JoxyWE2t6DvUXXhXwLGgZqe9GIYbvvnox0cgYxR3aNhQkyc+SOPSt1c0CjQF43K/mSVyBeKv3L2oLkGxSoH1HHNZuzxOmgQr0twXUcp1Bwmk61rdu+c/jAmReHb46loH6Izp0A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775715988; c=relaxed/simple; bh=/xOm6TyNauC3DzQ45c2C0G1NDXqTQyctsguu8Z1akjw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ERyWB5xj4t+LR9WgPiehH2Peg7NmPUW37DtdSzbzIf34P35TSSyLuWKnHs7r+J5mEWWGOFbyT8Xro1ndwYI9iMQCmuNLNJ9f/Hb2IS7e8EKxXZuVLWyfLNN5NUuaLFjis0rd0S9y1O0nsBJQDTlkOL/zThQ4mHZVvQP4lwN+CPo= 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=Ti2zcQoN; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jGaf/t2g; arc=none smtp.client-ip=205.220.168.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="Ti2zcQoN"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jGaf/t2g" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6395IR7v3716150 for ; Thu, 9 Apr 2026 06:26:25 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=shontEpkN+VyNwHrAxM7Bh6b8F8XkVW6TSO Gp+P9W6g=; b=Ti2zcQoNche4LFMWGOwpIk6RXNyMJi9ZTGNh53QzM/+kG8hUViz vMQGytepK1h7BDd6Ye52VDHQS/Kh0huLaNc74YNfgACDsc8Ipm941tVYpXz8XKR0 XGMtDseS9yoTe9iJmdHDXKywM34PWPRPC0GnxBXIN0yRdYJtG8s+08m9LElzx1jC rnOeRM4GGoHiT/YVR6RWptL8mq7TkC66m6VrZL7MjTzBSNinz8jNpC+0jKm99+9I HoGC0EvcM6Iz/O7DuHf9jbryIi/8Dk75jN21QWVbNKujAu69Ta4RfMZefujMn/oZ cJ2/4NnXyQlH3E9QOCD+xdRbPPSLZJnVm3w== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ddt74anhc-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 09 Apr 2026 06:26:25 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2b0b339b8dbso8614995ad.0 for ; Wed, 08 Apr 2026 23:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775715985; x=1776320785; 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=shontEpkN+VyNwHrAxM7Bh6b8F8XkVW6TSOGp+P9W6g=; b=jGaf/t2gQhV8KKfgjPPVA/E8M9w3aab8MlSC/4F8So5o7VVyR562BHsVu4Lb05mqpe F7LBWUW4Z/y06oSNFReDzcvboT00+eMyUFofpgoC2Pj5r96Ajenpo3OW9Ss3CKblSwMz QJ25hYF9rfp3JW5HiDboGuhZNmmRN+ulAI/81m1CMkbU2Pgs+PI7n+/fZ2NqAVn9H7oz 6W0kVtx3tICNWIBqr9feA4fFiW6JNEqmEa9/Ni7VOJIf5+XI4EEhVVEZCRlUhfALqsA/ 2f4NgCbJzW+UDjJlN/gHLmPrNzwK+FRgdurRCXe2OvJfku6yin0I89X5HPW1adVJ/y4K KnhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775715985; x=1776320785; 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=shontEpkN+VyNwHrAxM7Bh6b8F8XkVW6TSOGp+P9W6g=; b=stO5yCdD0qfMXNIzFMe/P7xRnrqDF5SzJPBekdn7AGlQdIhNE8bPtqhXAQLXEwf/X9 ER06hnRX72NwcuK675Ll7RSas+k3pQ6GUDrovnauT8j9vSfk4vInm81NzOeNOlyU9hxy FVewhaKaW7/wiq/O76xfPnQwBsELcP+kKJJEhc6HT5B7KRE3wGMOLnnwdd9lKE3vXAEG BbCqEgCy0B/flVgbQErbyg9WoytgOoyko4sesjqM9+8cKFL1v5cKY3fkeHJtsHW1CmKV pvfRsHBd9AvJ92SXUeBkAEyxn0YvMwqL+YPGDYR2CVLwaLADgP9GuDDUAInh9KuMkb77 7bJQ== X-Forwarded-Encrypted: i=1; AJvYcCWrzEMCk9LEqFdF4uye4ZN0GA/+kgxE8Mvl5PzouQe+6hZvxsjLmX7Q0vpKlkppAMtGmpwyLiyj2hnlpbs=@vger.kernel.org X-Gm-Message-State: AOJu0YwjlYvXed6Jp0P7EzlHUThlQS5e+25Pro3PaPSZdu/RUO2ZGhmR dfFLxlPm4eCWA0s8BMRBl89sTfq3Sii4CUwAFCxTXTZRpo906R/ORsvjsBCz4zLr3ejXXFiXGfg QbiqfwBZkku2J9F5+DqtZGMkhWBG59m6rZtCSg+OAUDxokMvvLlL1ca+yh2MiEJh85Gg= X-Gm-Gg: AeBDieui0jMkhZ3a+KxEY/7bK3LaOZux7ZLay95/W2cSKn+9HJUl8PMDBnaNpf/iWTw 3xmqL8anU600NRfodQH6sIOwjwN7TRaGyzX9xrAQ1spsGKk6VnCNbdSXstn9A/VRPpYGNdo4qPp 9x5gimfGn6UESVbpwxjtp7HBSQWM2kCQai7yW4ubWP0MCxIFYsn7eHiflz/L9RrinVnla/9VMF9 sO4Ua4fYQqsHGrX1QCYSK6sRa/B3TzZjaF9ri5q+aLMkm/dh367xheeYX7EZjc9jg6VtPKvnxe0 2p2dEecJkB+YxfoZo6uhs2iF7izEJKZyrN5FHZXX20aAr4NU0uKKb7gb+dtrFtJMZz3vu860KL4 2hUb10nOX1gh5jqf17xvwaNTnJyVH7QYVsvi4DodfKaHQSFTR7+I2zHshman0sowZt0ED/+TLtj O9unQfWVx9PeyKhM72UA== X-Received: by 2002:a17:903:384f:b0:2b0:b41e:c5c3 with SMTP id d9443c01a7336-2b28176a416mr247491845ad.29.1775715984842; Wed, 08 Apr 2026 23:26:24 -0700 (PDT) X-Received: by 2002:a17:903:384f:b0:2b0:b41e:c5c3 with SMTP id d9443c01a7336-2b28176a416mr247491615ad.29.1775715984381; Wed, 08 Apr 2026 23:26:24 -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-2b2749cbd4dsm220786795ad.76.2026.04.08.23.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2026 23:26:24 -0700 (PDT) From: Jianping Li To: Srinivas Kandagatla , Amol Maheshwari Cc: Arnd Bergmann , Greg Kroah-Hartman , Abel Vesa , Jorge Ramirez-Ortiz , 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, Jianping Li Subject: [PATCH v4 0/4] misc: fastrpc: Add missing bug fixes Date: Thu, 9 Apr 2026 14:26:13 +0800 Message-Id: <20260409062617.1182-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=TL51jVla c=1 sm=1 tr=0 ts=69d74691 cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=nVt4PUt5okI7hfkv_aUA:9 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-ORIG-GUID: oxI2drF1RVry8w-QBCWdR5_guluKdHoz X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDA5MDA1NSBTYWx0ZWRfX4fUDOPk/7Nol vnZ5HoUdB+3b/i//vZWSoajrozz+wvGtT/LF2hpFWLT3j50Noz+jO0/JW8QPHIY6HA3g8H9UMkN BBslzdZLUpiBNd5iw///S55eUVCFXW0xSh4TglxQtrzE7J/cYYH1mTHjt6Un9YOIB8VAwIyzOUU v97vTYZFIVsEUymWddq/nanN6TbytHNF0OQF+/PFApCN71p57RSdneMYw8O38Mw/yQHFKMlFaPM Lmx70BFZwhTgCWHWacIpGJuM7ls8bCkSh89LL/N/P0pLAN1VQrx0DcnhctXh8QYvpzPjtOwbC3a GDWpMGsrRMUXjCryTjRSbO6ousMZRUnYs9jByYjyO51PrEmjLj8CNhq1RQuHs/OYSOT6opjJflM lGMdQc3NdQlYcquKQr5YyhDQpAKbh1Dbezwbj4T0VEd1qGt91NxpQBe27+V2r82QvJq1EGL9TkP OFtgU7nhXxZx2CfNpNA== X-Proofpoint-GUID: oxI2drF1RVry8w-QBCWdR5_guluKdHoz 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-04-09_01,2026-04-08_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 adultscore=0 spamscore=0 suspectscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604090055 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 [v3]: https://lore.kernel.org/all/20260407100508.1027-1-jianping.li@oss.qualcomm.com/ 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 (1): misc: fastrpc: Allocate entire reserved memory for Audio PD in probe drivers/misc/fastrpc.c | 136 ++++++++++++++++++++++------------------- 1 file changed, 74 insertions(+), 62 deletions(-) -- 2.43.0