Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3024213imw; Sun, 10 Jul 2022 23:15:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tSfMtW+stadYzNv40GC4lVHUfZ4CIZYaTQBX18M4LvsuaJk0xm6w5oWcMBx9EhQlhW/2lo X-Received: by 2002:a17:902:c94e:b0:16c:4d5e:5dfc with SMTP id i14-20020a170902c94e00b0016c4d5e5dfcmr2897683pla.56.1657520122144; Sun, 10 Jul 2022 23:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657520122; cv=none; d=google.com; s=arc-20160816; b=l+C3y4Lxn7n1BMkmP+kKJdFUEoEiHyyWFCmeOFvKPtqD+JGgVEIPcRd6T07TghCbY8 q3qtqZCapspPeaH5Q5ivqypRkKKEbbJjBloYP+H0TVWX3Hz+m/CLVbQ0RQ0ShwTbVCgO +hjcK+3E0P9Yt2Aea1kfyeY4M8ECyWS+2rbyGwypBn09/6TKqjYejj8QM3Cr8oPn5uBi 4h0/2OBakDfgAtGeHUxI9UUI5F3ESgO1UrPnCl5Gs2VGzc7zBWn385y2Tq2FMRs0QBcA sWQWRk6lCLAVEhiFY9VtEBN0VIbqJNl+8U6XoeKrYrF/C9cbiTnf7h6rB+/qWpLy9ukZ et9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=V0rcV06U3WIn3O5UNkF+0CP8tSpeEXIUs1+Som6c9Gg=; b=ysEmqtCPL1u+pcYhYNcuo2x2jMgVyk4nJK8TGT4BO9wj84/wPgWzvsTfiKQ3nnNyda 6jASI6xNZzbCW9njklVu2BuDlJvmpxyJ9l9xFFaqAUpiy2WOMKX8jlrzKaNPGjkPPPJc x8SKYAVdFDVmdoLr7iHe3MBOpfBbOozM84kfk/8xNzpJyEaQvXqVGBft6R0mNZKqOrgo oFGkWWibRIdnn/n3sq/eh5CWdxHiNGpBcgntdEM3siXDCm7LLvXY9IOgl0GF1zOsBgG6 KIZhfn9K3Fw2TOmkRO3YiGGikt2Dd4/C2LtXTbLcL6WjCaw2rHGKiCcCWCuVT/pbaCG5 VTjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LU1rAOGm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d65-20020a636844000000b00415dfc1a372si7594071pgc.188.2022.07.10.23.14.54; Sun, 10 Jul 2022 23:15:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LU1rAOGm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229654AbiGKGJg (ORCPT + 99 others); Mon, 11 Jul 2022 02:09:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbiGKGJf (ORCPT ); Mon, 11 Jul 2022 02:09:35 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B040A44B for ; Sun, 10 Jul 2022 23:09:34 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id c13so3602964pla.6 for ; Sun, 10 Jul 2022 23:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V0rcV06U3WIn3O5UNkF+0CP8tSpeEXIUs1+Som6c9Gg=; b=LU1rAOGmOn+43YOFKj09xuQ5pIBAiMPiAm/JlURJbUS28k9Q5pHqzijZq3QKAQ41D3 acp0jhmJVygrwBW0v8s4VRXKsYbmO2D/p0VeUaGKGdsX2dK0rUoqhXZ3i+7d4tYCsf5j ArulmyuT4qsqKCunnqsQGl7aYXw4toLruOxeRFqc7V1bw+TSwTjChHNq+pa5JVPY7fYa nWw/vXh/LU3XWueM4FWC6vRig+vTyasMNDN58+s7ev8D6k6a2TmArkWaWzh6WCZ5lL0d 3gEDM93cN+GwNuOb6QAWFyym4khU/RL2bT8QhPn0kyY4y5Bq4QnkF7hb+njKN4vFm6w/ ukQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V0rcV06U3WIn3O5UNkF+0CP8tSpeEXIUs1+Som6c9Gg=; b=kCIwgRv/z3aLNthqYkdz9xlqsW+7Xi2KJzlKRUKUgPAw1BQBeuztQ9SAdVHhUJvQMe RflBPEJ8dD9bAvBLlHZR1PGGckBfXmNqlECvigVmK+IaLL8RkLOPteb8sDj+dPjf/5jo /hkWIRE11fTPBdRuwAktaxBiFEk0gEcolO8QqIcn/UAkDE18OJuklj9PK9bwq8TF2GOk MynKGv7AEhkvOwL3kSHbg56Fc7pkyVy/PXOC2Oa6fkjg+ubyvM885AUs8j8ggVeAZjoQ Oc/TEJpVl9oaBL71+P7b/1Y8LJNuoqRuRXelDS2mtQjLj+kLnUMIaALCmCsXIpb6nESU 5ptA== X-Gm-Message-State: AJIora8ZrGMUvNkakkAqxu1LV5wkYdG2hSAo6YSvdrT6zoBjFPhf1WaD GFs9o0WyWL8SzOaW7ISAMVdkBZO5GbiMBCY454b2Gg== X-Received: by 2002:a17:902:c94b:b0:16a:3f98:84fd with SMTP id i11-20020a170902c94b00b0016a3f9884fdmr16809871pla.70.1657519773680; Sun, 10 Jul 2022 23:09:33 -0700 (PDT) MIME-Version: 1.0 References: <20220628065216.901194-1-yangyingliang@huawei.com> In-Reply-To: <20220628065216.901194-1-yangyingliang@huawei.com> From: Jens Wiklander Date: Mon, 11 Jul 2022 08:09:22 +0200 Message-ID: Subject: Re: [PATCH] optee: smc_abi.c: fix wrong pointer passed to IS_ERR/PTR_ERR() To: Yang Yingliang Cc: linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org, sumit.garg@linaro.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 28, 2022 at 8:42 AM Yang Yingliang wrote: > > It should be 'rpc_arg' pass to IS_ERR/PTR_ERR(). > > Fixes: ed8faf6c8f8c ("optee: add OPTEE_SMC_CALL_WITH_RPC_ARG and OPTEE_SMC_CALL_WITH_REGD_ARG") > Reported-by: Hulk Robot > Signed-off-by: Yang Yingliang > --- > drivers/tee/optee/smc_abi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) I'm picking up this. I've added some description in the commit message. Thanks, Jens > > diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c > index 385cb0aee610..a1c1fa1a9c28 100644 > --- a/drivers/tee/optee/smc_abi.c > +++ b/drivers/tee/optee/smc_abi.c > @@ -884,8 +884,8 @@ static int optee_smc_do_call_with_arg(struct tee_context *ctx, > > rpc_arg_offs = OPTEE_MSG_GET_ARG_SIZE(arg->num_params); > rpc_arg = tee_shm_get_va(shm, offs + rpc_arg_offs); > - if (IS_ERR(arg)) > - return PTR_ERR(arg); > + if (IS_ERR(rpc_arg)) > + return PTR_ERR(rpc_arg); > } > > if (rpc_arg && tee_shm_is_dynamic(shm)) { > -- > 2.25.1 >