From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0513A33EB0B; Mon, 26 Jan 2026 15:24:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769441099; cv=none; b=JhH4sx18BYtyOHoQpAkfsZ9irKtwKWwRVPagV1nkAQpwELh16UeX5fjf7N64hLXH9FCdSeXbjfWTi4bw5UeWqYx34KfrxP5m+bQ0aJiccLrpb12eENPoVbMJC3PEt2DONyH5U08HBZLWpY78LytcWIiykyZp8Bu+04eskj6v5UI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769441099; c=relaxed/simple; bh=qW3jLL79ZgShufLkh2Ostlhg6VKDXwftvT7kEgnyCiQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=T26svICt/hUcfeCUR5TgXg1OR3bJmRmbSXbO/ubZ9LTYfurKwFa+qX0DK8ygt1nR8nWLMT4zygyVvX3W5zPs58gleeMFY0meF7KukvEhS76UsvPj9Hnv2MR+vEvL1rSWeB/ZqauqUEJJ+mXuQasG0D6VDdb878MLNLUnnEUgZcA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=b39j7BQa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="b39j7BQa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F585C116C6; Mon, 26 Jan 2026 15:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1769441098; bh=qW3jLL79ZgShufLkh2Ostlhg6VKDXwftvT7kEgnyCiQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b39j7BQaYouf4gz+Q2m1L5B3DJX95wpHUaOro2P5FPbyd9RVieP9xBAEZgiw568Jy m58jQpbeAxmlFvZdu1KuBUbwi1SWNb+0vS/8v6ZIxOywTfYmcDoVJmV1BIT9V62ddF eFvY/iRi4I9CrBx6hV318GyeBq02Z4lmqJsslmB0= Date: Mon, 26 Jan 2026 16:24:55 +0100 From: Greg KH To: Xingjing Deng Cc: srini@kernel.org, amahesh@qti.qualcomm.com, arnd@arndb.de, dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Xingjing Deng , stable@vger.kernel.org Subject: Re: [PATCH v5] misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe Message-ID: <2026012631-suffice-enforcer-8553@gregkh> References: <20260117140351.875511-1-xjdeng@buaa.edu.cn> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260117140351.875511-1-xjdeng@buaa.edu.cn> On Sat, Jan 17, 2026 at 10:03:51PM +0800, Xingjing Deng wrote: > 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 > checked. > > Fail the probe if the SCM call fails to avoid continuing with an > unexpected/incorrect memory permission configuration. > > The file has passed the check of checkpatch. > > Fixes: c3c0363bc72d4 ("misc: fastrpc: support complete DMA pool access to the DSP") > Cc: stable@vger.kernel.org # 6.11-rc1 > Signed-off-by: Xingjing Deng > --- > v5: > - Squash the functional change and indentation fix into a single patch. > - Link to v4: https://lore.kernel.org/linux-arm-msm/2026011637-statute-showy-2c3f@gregkh/T/#t > > v4: > - Format the indentation > - Link to v3: https://lore.kernel.org/linux-arm-msm/20260113084352.72itrloj5w7qb5o3@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.e2ke47gy3hnfi67e@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 | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c > index fb3b54e05928..d9650efa443f 100644 > --- a/drivers/misc/fastrpc.c > +++ b/drivers/misc/fastrpc.c > @@ -2338,8 +2338,13 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev) > if (!err) { > src_perms = BIT(QCOM_SCM_VMID_HLOS); > > - qcom_scm_assign_mem(res.start, resource_size(&res), &src_perms, > - data->vmperms, data->vmcount); > + err = qcom_scm_assign_mem(res.start, resource_size(&res), &src_perms, > + data->vmperms, data->vmcount); > + if (err) { > + dev_err(rdev, "Failed to assign memory phys 0x%llx size 0x%llx err %d", > + res.start, resource_size(&res), err); Shouldn't the caller function report the error? How as this found and tested? thanks, greg k-h