Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1988513imm; Thu, 24 May 2018 04:06:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqmfcCGzRHT2vELo0ddu4IdeN4Qp6txvlSj6iv2PRcy3UI/eGLcNYTaxiEheabBq2nqzP3l X-Received: by 2002:a65:4d8a:: with SMTP id p10-v6mr5487078pgq.21.1527159989527; Thu, 24 May 2018 04:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527159989; cv=none; d=google.com; s=arc-20160816; b=CmQH9VAH5O5SpiwG/LgUL3EmWDHng+NzghPusO4CPtOARNizrMANK7cRzYwMvx2c1g IP+OlHCmr2ZYh7sV8EyaUAa2Fekj30PAomnKui55ENqEzfilbSRtWorXRLNOlwqbhA3M cYeWvbOa3rWnpr7B+44EFk+ORcO4tv73rEnFuPL42yBBhTNur0IItws/GvEsxYdOLsb7 P7hmHx5PCVq2C4i71TtgPVkz9i/oRZwRcDqaiJmIe5Bfr40H58P8OXEtA0U5VT3L2TRk I2yv92t8ZcrgL8iXb4eS4VX8nueI6JkkioD1ENkp4b4kuf3ZmJrg/Efn+0KkZ6mYer89 sXiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=cJNZXs4FXDsHIbMvTWaruoltkzAUWDs+36pCc0w3N9U=; b=QJ8Bt241kx3pxwfjOpZ0mlm0gPOE9eli15qGZfQ7oNwj3Yn+lD2a4N8eAB0P8sq0cR 6hYrgB1c0LQZ+Ab5BOPf0PB9r07VmXZmRGb/mVsRBpohFSjbYjmiaCw7LnUuOggSEJ+W iA2/LY3ZA4AlC63H/aWbcf4uq7pqdFkzZNV57NSwpeehxIskEh838xSK61AmCWqQ+OUY oLOUCN0vAbYnlX7ntEHmWDFtsf90+oUH+g5FcehgwRiOGf3GxDpEG8+cOcVCW9qkcxzQ fU787VaOt0GNShwrbdRNgpHfB6Un+quuVqQcglV2K2K53kjAwwPPro+tC0sa9wLRiUSU okhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ICyMt+4v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v31-v6si160218plg.339.2018.05.24.04.06.14; Thu, 24 May 2018 04:06:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ICyMt+4v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032733AbeEXLF3 (ORCPT + 99 others); Thu, 24 May 2018 07:05:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:35372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968304AbeEXJzQ (ORCPT ); Thu, 24 May 2018 05:55:16 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1D52720891; Thu, 24 May 2018 09:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155715; bh=zpVYs3WiKGujnJM4qe0OImbkG97AYcemX//1pXqZJE4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ICyMt+4vV8FbcjBRa7/JlSUGiyvZwxioysKJ1x9EcTPoqaU4+jl2rHXoYOIKGwZFS qbB1wagsULwJQZQ62U1o93DIlJVnfYvlVpDxUtoYkdzSiHiW7YrNqfbGO4SFUHTYdt YC9H3SRgJxIqN+rRpgYtSD9GNJmtRzZRZUxK1raE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ofer Heifetz , Antoine Tenart , Herbert Xu , Sasha Levin Subject: [PATCH 4.14 091/165] crypto: inside-secure - wait for the request to complete if in the backlog Date: Thu, 24 May 2018 11:38:17 +0200 Message-Id: <20180524093625.706758718@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Antoine Tenart [ Upstream commit 4dc5475ae0375ea4f9283dfd9b2ddc91b20d4c4b ] This patch updates the safexcel_hmac_init_pad() function to also wait for completion when the digest return code is -EBUSY, as it would mean the request is in the backlog to be processed later. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Suggested-by: Ofer Heifetz Signed-off-by: Antoine Tenart Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/inside-secure/safexcel_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/crypto/inside-secure/safexcel_hash.c +++ b/drivers/crypto/inside-secure/safexcel_hash.c @@ -819,7 +819,7 @@ static int safexcel_hmac_init_pad(struct init_completion(&result.completion); ret = crypto_ahash_digest(areq); - if (ret == -EINPROGRESS) { + if (ret == -EINPROGRESS || ret == -EBUSY) { wait_for_completion_interruptible(&result.completion); ret = result.error; }