Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9080027pxu; Mon, 28 Dec 2020 06:09:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxrJ7ZepDXDJjZqtvP0ub+Li9n8PY0GWgm0bEPUIewQj9fCxjv9CfD4aL+EOVSHHnNNVlqE X-Received: by 2002:a17:906:ce2b:: with SMTP id sd11mr42305720ejb.334.1609164588811; Mon, 28 Dec 2020 06:09:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164588; cv=none; d=google.com; s=arc-20160816; b=QLpE9CrdOibmtG/+0XYap5b7PGCqo54H2WaXEEzVMPV956JETf9/4WGeGH18J3dbIp MDs81/Bx+pHDyzi+gbbJnBEUrxVWC57CV2rh/NP+oDdjbCFRNMd0vxa8eKSRLLPDrY+9 3TLMe8FC1NuuqdKPBM5+FU7FqDFF5IjdAAeAcLmpUGiLI1fDEzjS+hTtYqn+3tJB0v83 OT+K2eeH/EUoGYYdqwND7XOKC+ZNpmClD8UVF8QPjfEV2orNz9t5sLceuYs4W0zohngD 38y0o7CbctrQeeDWYBdWacVE2lyDvbQw1wKS9Us+dMe/yu4xJW+/v/ThMShIH2KqFCp9 0aYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sQl7GzFG0YtM5cwqrXP/0xSMOGC4G0bo0EI9rOOEqXo=; b=MjX/ytmGQEsx+PFTcE8XUxZiZ/LGVKISFAlM8vr8KBXf7Ea3uERVIbTZvIqQqxz3Pj rAYH9dSTMwaKGl3sG5sAyiYr1aQtaUo+NLROCO5lsHlO5Y2+v+D9v6DFHstzf5yJDIcd WyXKkltlUG4IrzLgkDdkpqUjh+x6fvqR4rfg0NrBf9btxw8eeHsFp5vymCYoZvckKfUn Y+H0hwmKMC9WeKFA0dmwccBspvXCFlGqtmcyXaj9GiVfFbNkop2GI8ZvxWhtTjV+DA5+ zrikGscHXfRBK6forBICkLbR9rOVfqd2UBVfvqrrBfiCLIKGvKkkEVtc5yLOndlnh7eK YM+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PGJDaq+D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si9068786ejm.276.2020.12.28.06.09.25; Mon, 28 Dec 2020 06:09:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PGJDaq+D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438318AbgL1OHG (ORCPT + 99 others); Mon, 28 Dec 2020 09:07:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:41034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438130AbgL1OGb (ORCPT ); Mon, 28 Dec 2020 09:06:31 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B68BF207B7; Mon, 28 Dec 2020 14:05:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164350; bh=SalygURyFGZuo7ovPypXrwErcZqfTMmgkCjICmgwdS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PGJDaq+D2M1GYNXEVDc+0PojiVOXcokSH2VSeO4EB/0O8e66IOY5CuicpkrgFesVd W+T51o43VzOgg+KeXFpsY30M+UtANcUrAeFezc9qJ8ksfRmhBOgwU9U2+l3lGxsdn/ wnXmBWaHVkhQPfZG+NNLGnJeS2pcodV8Jo81oB5c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jack Xu , Giovanni Cabiddu , Fiona Trahe , Herbert Xu , Sasha Levin Subject: [PATCH 5.10 108/717] crypto: qat - fix status check in qat_hal_put_rel_rd_xfer() Date: Mon, 28 Dec 2020 13:41:46 +0100 Message-Id: <20201228125026.129138461@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jack Xu [ Upstream commit 3b5c130fb2e4c045369791c33c83b59f6e84f7d6 ] The return value of qat_hal_rd_ae_csr() is always a CSR value and never a status and should not be stored in the status variable of qat_hal_put_rel_rd_xfer(). This removes the assignment as qat_hal_rd_ae_csr() is not expected to fail. A more comprehensive handling of the theoretical corner case which could result in a fail will be submitted in a separate patch. Fixes: 8c9478a400b7 ("crypto: qat - reduce stack size with KASAN") Signed-off-by: Jack Xu Reviewed-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/qat/qat_common/qat_hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_common/qat_hal.c b/drivers/crypto/qat/qat_common/qat_hal.c index 6b9d47682d04d..52ef80efeddc6 100644 --- a/drivers/crypto/qat/qat_common/qat_hal.c +++ b/drivers/crypto/qat/qat_common/qat_hal.c @@ -1146,7 +1146,7 @@ static int qat_hal_put_rel_rd_xfer(struct icp_qat_fw_loader_handle *handle, unsigned short mask; unsigned short dr_offset = 0x10; - status = ctx_enables = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); + ctx_enables = qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES); if (CE_INUSE_CONTEXTS & ctx_enables) { if (ctx & 0x1) { pr_err("QAT: bad 4-ctx mode,ctx=0x%x\n", ctx); -- 2.27.0