From nobody Mon Feb 9 01:16:53 2026 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.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 B7C433090E2 for ; Wed, 28 Jan 2026 03:35:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769571305; cv=none; b=cDM0bw9BVM0gtVyiWRGbwagOiEn/esm2xzV81Msu0Sg644bKmLOL/YhDXspNAlI1p7WK1kkNVYCmmYHL2S8ZR1Svfx6dIEk00P//oRCIqPvuXdvx0X3GsVbeE2JW4GcA/lUHdg+IRWnAaaGHltU4XzGMS0CZkaGJs6MltByG2BU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769571305; c=relaxed/simple; bh=Ou+KR5KL+jX67jdhCMT9s0zKv0nF8rlEUrDRejVIUAU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Ttyp51VAnbj2gG2ioiMgUrWXvsRlc+wn/5koQpIfG9BYBxeW7kFc3DIcnWEOTEAgHK4oKcJm4wsrU/PNn+gcAJVhp7mSBPsiHWyQzzpYStB6cZwgX3JO4qnQSCQdQbfs7aUXvfHp19TW4zHzQ3D9lo09mcqfdnEnGwLE9t+faho= 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=dOaFXmDX; arc=none smtp.client-ip=209.85.210.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="dOaFXmDX" Received: by mail-pf1-f195.google.com with SMTP id d2e1a72fcca58-82311f4070cso257546b3a.0 for ; Tue, 27 Jan 2026 19:35:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769571303; x=1770176103; 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=vHsef8Eavky6gF12HHQo8VAwR8PkAm6f6g30n7mS7sU=; b=dOaFXmDXe0fHy7SYQUHn9NfCqqeNWUUsuzrqVRUujzDoDee/w6KK/y1Dqb1hpv2iIW FLa3ESylHgRvC9Jk0OiaaB3ri3fZwd87DUl/I2Tdhv+yR+Hn0wMGe4X4Z6AfpoeuUslI hzP8mflefeY2pnFeAUIrV1WvU+jte8mZDHhA9B8xH3ah0amd1pJJbgIXgpHx0dMuynEe T81MqaLvwz2Zx3FUiItZBjqlsjuUt75k3gyLimNz73n2YLDgLj0TgwewG26jKrwp9qYR 8V2TTGcg50xT2Kr1n/kqpLHBQDrozSzQCYSMa1FsZd08pSJ/89JwEnc6Qwh7zxZNUwWd DD0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769571303; x=1770176103; 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=vHsef8Eavky6gF12HHQo8VAwR8PkAm6f6g30n7mS7sU=; b=qcmBA3OBPvYSDKJAlFP1OwMm6MWSxRN2fz7cdHXLfALbLWWsCsOug230ejHyErKfng EuxAGxkhKks/01/NPhIVY/ZvZgahrZTZEFfao5u6KwxAVl6D4A+KaDV7hix2ADT38HS0 Z+AyjwmWwdhEcBO4aPdPyYBdrgB34Hsq6ZRxpNZzy/qqNKPQwKqcsMCUexrd9b9CoEMo zXvkQzwdzQooslyClB0EvoghBwIq3mW9nTo8vHJyEZW5oWDuEYh1rFyHReJKrbRjaIf2 loFkbRYiO1g2tuHu+KfHvimTNSwGdvHWSvUVhHGzG6EvhJvhE00V50fU1aDYoKtIYytD IiSA== X-Forwarded-Encrypted: i=1; AJvYcCWkP0/XpkgZCCOa7cd/93DqbZ5tZtmf5hcl8i6nS6hH+86WE5vPGBlE2kigK0r1uADvJnlpUjSa1JF+s48=@vger.kernel.org X-Gm-Message-State: AOJu0YwGPOjZ/gmnHfH0cYUZRbyb+uvKh1QeT3i3TMyVmRFHxBcP/iog xCD/ZyUUq8GJD9as/G7tkivBoFXYF3zbCdoo/k8JrU83zXz/VEMMqMQD X-Gm-Gg: AZuq6aI7zVXWK8V+4UkANhr5a8ruHmwTY9eEw4SHqau1rBYmu1I8SEDsU+3Jy2GSA8m C3r8yqeTLQgdR3YotLVtlLqmi3G1IbpdSKL6YxregN1GsxaKqVCWmstfW5XIXzG+g7D6SC7Zhes B7RTnZQL8aXew0Y6apC0eISiCAvgMY3PzoZbe7Nv6a11f/+mlNz+u81hOt75ccfU8AGes/9Puzc bcUIKVOJqoRBs33FI9rSg7lL5gCpeifUHeTui/vSU2eV3C8/OnMjHzqc3OhKvZu6FAztui3mPYm KfQZO4GlE2OVZlIxeuNNGyx/h9AKXLYKePieajgwGyua9nOsq9S/1GA+gSj8IAiLwcri76axLnj j03nY8WS0WaCvINTMIe/GiePnTHbvNJO1ikmXYo6azmbfkdqMAb3u7rGVPZ11LBBUA25WtDJZhp sUo3YT8GySfl1oCuFhmTv0YQO+5tmZTxA= X-Received: by 2002:a05:6a00:886:b0:81f:535f:b48a with SMTP id d2e1a72fcca58-8236a14b4a7mr3625497b3a.7.1769571302990; Tue, 27 Jan 2026 19:35:02 -0800 (PST) Received: from localhost.localdomain ([1.203.169.108]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82379c226afsm948671b3a.49.2026.01.27.19.34.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 19:35:02 -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 v6] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe Date: Wed, 28 Jan 2026 11:34:54 +0800 Message-Id: <20260128033454.2614886-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 detected by a private static analysis tool. No actual hardware testing was performed as the issue is purely code-level and verified via static analysis. 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 --- 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