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 5F8E03A2E12 for ; Fri, 15 May 2026 12:41:33 +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=1778848894; cv=none; b=AzF0PSnUsddbOnEyb9a+/w2CNC9dKChNBAUZTmkk/2orcdwRIETt1HyLR5+jVrGydLIN4DpzVy3YeniV1sqhPRQNDT6aR9EhBQvehUd2wf5TXxU/xDgI420HTc6rfdx/Qu+FcRUvQsyeQzFWBge2eyWQjdtg98giRu+zD2n0Q+g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778848894; c=relaxed/simple; bh=fKYBDJdXDp67Zr7KM8kkWqEN84dwC5WY1qu6gcK8d+U=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=qw7McUMIY6WHGN14LfzzhFlbeFGG0ZfvKdWANW8mnbZgWL6apQgLoBFCsBMhOm7VIXPYj5y9kmGARUFSmohTWZ2SwFah2YJBgipXVXxvBnebqoSYpNTlAZh76+nLx56yTKNS8VA7uf2ap9BgILBzDNHMYI9NZpx9w/GqDkm1QoM= 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=MtOaV8z0; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=MKyyKVFx; 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="MtOaV8z0"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="MKyyKVFx" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64FBTYGi3795589 for ; Fri, 15 May 2026 12:41:32 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=MtOaV8z06trh6NO3LAF/heBio6dZNdEbOp452Erk8v629kS5Lvn F9R38O1CKMYEk62PpiYch//xGHy2MwSXpMVHvol0M+/ppsEBMiHWus8TIK8casn0 2MK3/uRSCC7BAHMDE8gM5fffYsThRh3LiTWQtogrFJLyl9vTWT/uQ+ZEibjjGEAV K6A/UPyjdFvuJ91HPBZYgbQw7IlBVJWxnry+2fyjaljqMkcrjSqw0EF2nWMH5wVS BqyUVBLzirNCq8B5PuxBR4nYH9IQ4Fy77sCGlMLHkY4tYn7yWuI8GOJJi1TcUocZ CquZFqG9penCqYgnqZVM2+soVACIHtqBxSg== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e5m1su73h-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 15 May 2026 12:41:32 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-365fd467cf6so8048450a91.0 for ; Fri, 15 May 2026 05:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778848891; x=1779453691; 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=MKyyKVFxUPKp7ikmLAtavBL65xRmPlYtGVmGPOzP28pSg7uBtXT+H3Kd/zOp11/kD2 a+sxH8nw3UUFLv0QRVJ8GEcWo8Sp45kl/QllTaZgXSamRC74dUIo0w7bQYHLW984gQwQ nidr4d7+lVroyGvkA/d/dkoHqvs6gfyyAMeuazI1YwKHpSSL1zADwGPxbTsdFAkNLYlu +nNJqG/CV6LU0jPxvfUnQZpmg1TbdjXh/KYyrb1aqQlp6gWZUy7SHFhWmrz6q/GsKBpu yIdFe8p/7W0sK59gbIAE4agK6kbiKAb8Ox+NzJ19OVCwlSBpvji2lwcpDES+Hn2MX17A 6s9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778848891; x=1779453691; 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=ildEp42x0twR8uAyt73G+0u9t/Hv7yDDZQUq7RWH7BpywUZbkj9DX/AsBAwqjxRJg0 gzYw1LiV16OT1/xUGNr/v37bD9cjJweUXFFCFY9F84KH+2cxWbCtjTAI+Zl6Xj7gTx9i Ozva4pTlBnPldWwPKqHNnYW7rbpoMID4Nz9yx3uM6IZjSDyA+yEiVbTwVsRftjR6qiWL FTgVCWV+Hi4N9TUUgOVjQAj7FYKG+UvpB1IZZd4Fjkzhuq7l63Xg288wSo3D30mkkuhc u4VghQ3aBoybLJ+6UwE4CG4MZ20IPkpW/de27Ob7rx8r9e/AiL0kZUNhI4KamdcCV2YT A1AA== X-Forwarded-Encrypted: i=1; AFNElJ9SWFizxh5odNoUD1fUYRZ60fcGP2aVTnP928z4i5or02M1ewao/Dareihui1BsFrEViFFY1PAxB43wyXs=@vger.kernel.org X-Gm-Message-State: AOJu0YyxLwRLHC0PRhMV6Auv6Ll2Z5uXbvNCaFOzA2V72fl1BZG4D5B2 ttqpMismm8FjX0EtL7QGgSnZv86Ovfp/hQXpsElzFaL+xGiKZt/SiX7PPq9lPl8umHy9Cul+u+a JTIQkrDq2XjHFvqMy+RPB9Gsou2pc4lKOlGkYXFgRZm6p2CkDr3CL8Dpa+bRWmNwhMG4= X-Gm-Gg: Acq92OGrU1CGQXkPlPW5oEeEBtfdC6IB0AfgnwLHhTpLG6mk4EHZrWcbXwuGWwBgSwN NzXwhfnnAbnXbwUZ9XEwAvuBMrTXTi+70jcUQZBERE62mgwemKXBfyot/PSPRUioY7AcYCT3Ibo /0n6qJWgU/70iYHgwV1Wwsktr8NB7Cd2ozfY9FvqXFCTzwxf9tPtkKnyX9nSZwVcsksGV5LywAK 6yzA9JO+1ar4BqdzXaFt7pZiUs2rL1/7QufYmWBZwbBnHCNmpZTbo9QkWkB50xRX5l2Tc59xhPV tuNWPkHS3lDATZZNjIMUQkoqXiyJIJa3adsx7uLUcotBurrHitvdfGqpXV8nKzqEKcobzh1F5QF QvX5YVQHlw0NDppJEytZm20k2xeu+IArp93hom6wWttbM8Pj95rU= X-Received: by 2002:a17:90b:5648:b0:35e:27ec:de0 with SMTP id 98e67ed59e1d1-36951b971e2mr3588926a91.13.1778848891276; Fri, 15 May 2026 05:41:31 -0700 (PDT) X-Received: by 2002:a17:90b:5648:b0:35e:27ec:de0 with SMTP id 98e67ed59e1d1-36951b971e2mr3588899a91.13.1778848890751; Fri, 15 May 2026 05:41:30 -0700 (PDT) Received: from QCOM-SocCW5bzXR.qualcomm.com ([114.94.8.21]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2bd5bd60275sm54910485ad.7.2026.05.15.05.41.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 05:41:30 -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:40:05 +0800 Message-Id: <20260515124010.20679-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-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTE1MDEyOSBTYWx0ZWRfX1Kq6o0xI9JI2 AYd8PtDcx9HG4bihr3KaDyLOYSLNEV/BLC2KjhZYpP8UmJd9fjUheTcAWzDlftaYj+FYkuRVlIS xUD6P91w0Uepc5qSg2YwYFXe2cyOKkp4ixS58QnISomMaJuj7bal/Yjte/BJVBBUPJFJE/+q9OX qIS1Sc71huASBgOF29weIWI+bJeTwnAyZLzNvfCCG3L/loLMkWHfYvgQB2VjAfhjh6fNcV0ton4 qkKp6WdDx3raRpnOmnZX1bhIxR3N4Ifcljy8vU4Fd7jOiCN16rTJzaLU3RXcSHKVKdtWY4a3i7N FfgaGL/lOKf4YTWoZYJg4mbdvZVH+aUoQ+vF/BxiPko1Z25/RnKIOccpzjkYZ8aG3856htjm8wr ui8PjbfImwIXPPzhn1eff1z4f3S1SOG1GjIjCYTS9ymMTjojfpWIHoP4mLeG4iCL+GNfdM9GfZ6 PmNDY0YN6BUoC6R9R5A== X-Authority-Analysis: v=2.4 cv=cZXiaHDM c=1 sm=1 tr=0 ts=6a07147c cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=Uz3yg00KUFJ2y2WijEJ4bw==:17 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=mSfM1xQJxAVIrMv2y48A:9 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-GUID: 38ypgBClaavVdKVkKmk0vP5sJrQs9wcl X-Proofpoint-ORIG-GUID: 38ypgBClaavVdKVkKmk0vP5sJrQs9wcl 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 lowpriorityscore=0 spamscore=0 phishscore=0 suspectscore=0 adultscore=0 bulkscore=0 impostorscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 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