From nobody Sun Feb 8 20:17:39 2026 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45ACD36C0B1 for ; Thu, 29 Jan 2026 23:37:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.196 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769729833; cv=none; b=kx+mUI03iKTBrag+ZCgIPSG/r0iUhiTW4dWcpAvALM/U+Z2shOWZhcDnFIYjqpvSJalTT5fYQZ+rThIrduaLrshS2f45+94sbB1KTEmvIgxmsU+NLxyxBO+y2VI66gS1ZUoGjlnvtqmSRVBPbfVe/FV3NJuuc80WJobvcIvM6CA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769729833; c=relaxed/simple; bh=n57vfxcyYsqejyOw8je+0D5WTFziz1fnLyQKVj/lanM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=VNBBYatT7aBA4CHUE5gxpWUv9VOQDQ6CE7AkTG3vyWb7NL4IW+P6R+0UsT+5t+w0RWdH8smOKqh6QmIHkSOXUZVG1IjPJqiiDNQjx72rXmVYkS7t6xF9PlW7MX0FTxWrUuYJaqMTgi/iTucv3N1upUQ9BzrvQZj2/2pTxTa+czg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZrYMvPdm; arc=none smtp.client-ip=209.85.210.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZrYMvPdm" Received: by mail-pf1-f196.google.com with SMTP id d2e1a72fcca58-82310b74496so983005b3a.3 for ; Thu, 29 Jan 2026 15:37:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769729830; x=1770334630; 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=HFIOgnH6m/Tp8biSOxBgIzwBRfAedBPa4QLS4k9B36A=; b=ZrYMvPdmrtG14eU8IQPHlMH5z8pFom9XEEq6aKScBNUi3X3RWYHoKltOdPvjFfWlkm sJQelBBvKsrSJpcoCQzAVBIxFE0qFNXZedFxj1tp/6sUSwKMX0oC2g+z+FWtyYmbeEZU qewvKaWTSiWJMqowB1XuK6Z3HXyfCoaxjDEwvmR3p6tFRFLvBqAzPJLF4dhBXyHExKMn FfkI1DY5W6nqKRssFzx+vDT8Px/bBm3QHA9dnVrx2cjV2IWKNsSBiXKAga2d12S55w91 iHyNaUj6VbYWipDqqd4RExHG6IcNMLZhDj3Gpryvkce4Jc9tTMiLD+t+xAjC/Wi0FjNs OpLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769729830; x=1770334630; 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=HFIOgnH6m/Tp8biSOxBgIzwBRfAedBPa4QLS4k9B36A=; b=G9LygIk8Hwl2YGCwD3cqOQNFiwAaP8xNxKNUnqKE9qIinLUU0Sx2CJZ9XeDuwWdmJn nXSbEsgXkKG/Ij4IDiHH8r4FK+K6BF5LoqC3l0/TMhuwo1NflYezhr8uUbt7gmErYjh2 xiXZ0Z08s6whEGN/WSX8BzUvSnrBJYLAzEj21LKd7YDd0hxUzIv/S9UzJsaHrXLrRHO2 tJhkHbFb78SBPYdYc5jxrLDbLeGpJdaXF35srPBs2ws6OdF3vxWUOzY7ZSfR6hVweM4M UY4El8ck90sTkSWXHrsXRGK9H5qBALW2PY0pxg6hz63Y499VTcWR6U18sJYGUjx2ALCn Hklg== X-Forwarded-Encrypted: i=1; AJvYcCUbqaDiuMLJg6RWc0O/nBPLMQReRPVxJS53fOTO4lQfSMKMntImZnxZiKKP99M0zttsA2qCv2nKeY6O5ps=@vger.kernel.org X-Gm-Message-State: AOJu0YzremOu6IkUcqz1mke/vlfCioIML9DoaFxJuzZHQSt91tjMy2LR GNvg/QJYF64hWDfsRBeeBws1qyEstsaDOfgcy96s5vke7fybWaRfW8DO X-Gm-Gg: AZuq6aJsUWz0DrjRvT5uaRSPOwLRbWEO/lxj7nRDRVP9A+AXKbZxKH+ZSRHohjHvoVM MBr1A0ZX7k4UBSfoQg0+gbcyphbPUOLX7kMyQsftTl/viJ6ETYHSBSohFge+ZaAPf6eDHaRUT8m JNtbP2hqLdxdxtAm/ALDtQODMHIZWcTfu72vl+Aik+Ir56ol++n/mrOv22Srns5CUxs2LiOx/yi buFHt5zWqHQRDQ2teFuP2Yh6qtXZ4LFe27YV16OIIuWzcEAfHgvf6PeGvOM8TtstpfIT1jDlebo 7Jimyh75ueinVKbrTA8tyMauz1Kw8lA0ImnSVOixh0YQCJspUGSRXAdC/WS0+a/R/tZkLgdwtdV ZLonwBjYlJyc0W/LNUk1lrQu3GAgiYuyeklsY3yUjhpSpGHGKP//OAUXGe6vME0ZjDmK98BXBRZ 0q4TcQzBu+Nsvbip2XXuHy X-Received: by 2002:a05:6a00:8d87:b0:81f:4346:6870 with SMTP id d2e1a72fcca58-823ab695dd1mr915423b3a.28.1769729830385; Thu, 29 Jan 2026 15:37:10 -0800 (PST) Received: from localhost.localdomain ([1.203.169.108]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82379c5293dsm6256794b3a.61.2026.01.29.15.37.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 15:37:09 -0800 (PST) From: Xingjing Deng X-Google-Original-From: Xingjing Deng To: srini@kernel.org, amahesh@qti.qualcomm.com, arnd@arndb.de, gregkh@linuxfoundation.org Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Xingjing Deng , stable@vger.kernel.org Subject: [PATCH v7] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe Date: Fri, 30 Jan 2026 07:37:03 +0800 Message-Id: <20260129233703.407404-1-xjdeng@buaa.edu.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In the SDSP probe path, qcom_scm_assign_mem() is used to assign the reserved memory to the configured VMIDs, but its return value was not check= ed. Fail the probe if the SCM call fails to avoid continuing with an unexpected/incorrect memory permission configuration. This issue was found by an in-house analysis workflow that extracts AST-bas= ed information and runs static checks, with LLM assistance for triage, and was confirmed by manual code review. No hardware testing was performed. Fixes: c3c0363bc72d4 ("misc: fastrpc: support complete DMA pool access to t= he DSP") Cc: stable@vger.kernel.org # 6.11-rc1 Signed-off-by: Xingjing Deng --- v7: - Add the detail description of how the tool detect. - Link to v6: https://lore.kernel.org/linux-arm-msm/20260128033454.2614886-= 1-xjdeng@buaa.edu.cn/ v6: - Add description of the detection tool. - Link to v5: https://lore.kernel.org/linux-arm-msm/20260117140351.875511-1= -xjdeng@buaa.edu.cn/T/#u v5: - Squash the functional change and indentation fix into a single patch. - Link to v4: https://lore.kernel.org/linux-arm-msm/2026011637-statute-show= y-2c3f@gregkh/T/#t v4: - Format the indentation - Link to v3: https://lore.kernel.org/linux-arm-msm/20260113084352.72itrloj= 5w7qb5o3@hu-mojha-hyd.qualcomm.com/T/#t v3: - Add missing linux-kernel@vger.kernel.org to cc list. - Standarlize changelog placement/format. - Link to v2: https://lore.kernel.org/linux-arm-msm/20260113063618.e2ke47gy= 3hnfi67e@hu-mojha-hyd.qualcomm.com/T/#t v2: - Add Fixes: and Cc: stable tags. - Link to v1: https://lore.kernel.org/linux-arm-msm/20260113022550.4029635-= 1-xjdeng@buaa.edu.cn/T/#u --- drivers/misc/fastrpc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index ee652ef01534..8bac2216cb20 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -2337,8 +2337,11 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *= rpdev) if (!err) { src_perms =3D BIT(QCOM_SCM_VMID_HLOS); =20 - qcom_scm_assign_mem(res.start, resource_size(&res), &src_perms, + err =3D qcom_scm_assign_mem(res.start, resource_size(&res), &src_perms, data->vmperms, data->vmcount); + if (err) { + goto err_free_data; + } } =20 } --=20 2.25.1