From nobody Mon Feb 9 09:01:08 2026 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) (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 C5ECA2EC0B2 for ; Sat, 31 Jan 2026 06:55:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769842552; cv=none; b=f+BLsUiYgTFvqliHkyqJSTysp0Gc4bMEVx0jPFReeos+no0JOJjFoYezC4pcLBbeVV2MdDzVEUbTmBTF3sK+j1iNJFhDr5p/6hrIsdh+5puht7eV8p7d2bIC16Upm1wXNk7ELNhN/iMqesbEUq6IiDme2FwdZ+SLxzR3jIvOJN8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769842552; c=relaxed/simple; bh=5BmH12YbHKMwJRnWZOYAXW3Pk9yR76BehzdsGZW/grE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=nIGKRYA3CzPNSJ4117WxbrRGuUsZtrQ/pMxbkoJiaEmMfH8i0MnN+5pCcgDBC7W8yp/piaSVMAoTkVJgWt34FwsFAlQNMydpnYJr4jRDj4BODy2qQgDQi+re9aaFFjcIDraArRhImyQRRTOXHRdaj2VhiYfTw2C4m4L/jCmtebg= 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=QLHnadnT; arc=none smtp.client-ip=209.85.214.195 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="QLHnadnT" Received: by mail-pl1-f195.google.com with SMTP id d9443c01a7336-2a7a9b8ed69so27988075ad.2 for ; Fri, 30 Jan 2026 22:55:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769842550; x=1770447350; 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=KDLJXl3kO9WYLHYaAYOE8EZpw5zllMbrwjKTsjUtSuU=; b=QLHnadnTnLxIX7gRLWW4pI+261VDu9j+czXO4MmuQiXFnXFLuLlZBqnzgkOy2TNJRJ jr+nSXC5oWd00y5jCdabX9RF/4bQXpoSe40wf1FcIUEQ8GvP/wVvMklJVpGRKlfAPPzM IN39zS1vSeUqTc1O2vJmYrM8bhpPZnNWZfIKxZLsmrMtvYL93kJEt41Xh7dHTNJbmU7S MGCeSk19nKkEatiIibmBQhiZHDoG3DAw6tN2DY1FCtnLMOWbxYxoUAW8Gaf4sTU0nZOe tkYN0Ca+jVLHQ5QbvHVxROAz+HbTEn0NHAJ6JM4cKf6QdiwaClJ2PiUaXiT751c8JI1W 9Hhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769842550; x=1770447350; 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=KDLJXl3kO9WYLHYaAYOE8EZpw5zllMbrwjKTsjUtSuU=; b=nXmvPJWhpJZE8uZJbMRjY0xGppbiXAnvfI3zr6pRbmaAqNSyQ+n+d5gyBGbGjdC51i doooYMYBG9wvEwXYKWbXahjhbZsnJyIDQNDzJ+mA7kI9fdlX7Fma9H9u4zwRev+b4OZf pGm97zjaNTNPsRhV8EbJ2lEFKOr5FDqyfh9RjHouEY74EbHLY/2io4niuCYFF2RsVeAq frVd87VO0+PoC2LaC925J6carAOUAdLCnpci9LRG7A6o2Ku1r6/s3EYD8nexj/fe0Ekz YxeVA0frGyjZbus0KdqELkWk7vOueQPcts3MBLv+ShtDr0sY4Rq4Viv78U1bP0Tpk3yU KSwg== X-Forwarded-Encrypted: i=1; AJvYcCV/GlVGzknZA0Ep/QQakr5nQVLMtnQfwm5ybWsAMwlJc2vD169Jkw0nmAkJORQpDQGu/LTCaR+iTzDJnRk=@vger.kernel.org X-Gm-Message-State: AOJu0YzJWbCrHu4QhOd+l0xSixLUhpHIi+8GB5QZ0Nye1fLBLAUp5tYU XKpbwpynEGt+M1en3Rxb4zYwQpyaaAiCdwHRRknaj23EN43scD7fD99e X-Gm-Gg: AZuq6aI0suESmxkzTa3zeRQIU3zMzx6VLDOZuuTe5bx9XiicGriW6FKI6Y1xh7M+DbL 4vAKcieVuGqnbF+XQFTCyYhJpMRKeSEDK9pyZjsAD9yYKqCYuu6d9MXYqGvPmPo19YEiM8Wm+QG uV0u7vK12v7qcTVPaM+xI88SbhdF/4/uTAsoSi2hp3Un1j2iA67sfUyizbamnMeeIf25zyIiUyJ f2tJ199LBkMuwQ+3vE8ygTjMZNEuaidtP/rv22U14dBEh8DrInzcCN/B+zFAU29p3JqNWUn5Rti O2agzFH4Wre8i/i8IJsvviP5WuV9fplTgK+y01QprytOTCRUmxWLqoquz2InxwKvKkTFtqGO9f1 yP6zIxR2/bZ7NvCnc7IC6txurCkSfDb04IdT6/2Ggy1A61pkgZTqG1cbTIvBhtyBPNlhNh1rEH+ 475FOKKDq7P5jKjbI2yczRg96k726UzIaN0w== X-Received: by 2002:a17:902:ea11:b0:2a8:3707:d79f with SMTP id d9443c01a7336-2a8d96e3bfamr54830685ad.26.1769842550031; Fri, 30 Jan 2026 22:55:50 -0800 (PST) Received: from localhost.localdomain ([111.202.170.108]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a88b5d9a7bsm92571725ad.79.2026.01.30.22.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jan 2026 22:55:49 -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 v8] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe Date: Sat, 31 Jan 2026 14:55:39 +0800 Message-Id: <20260131065539.2124047-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 Reviewed-by: Dmitry Baryshkov --- v8: - Remove the redundant brace. - Link to v7: https://lore.kernel.org/linux-arm-msm/20260129233703.407404-1= -xjdeng@buaa.edu.cn/ 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index ee652ef01534..a669e4b2bb35 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -2337,8 +2337,10 @@ 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