Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1941113imm; Thu, 24 May 2018 03:18:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpM9s+MJDyNuRHeEADbFmrijO8bQEfqxDcxiYZ78EUOWLSfXgLMmjC3BXr6ZCfzeROZMHCQ X-Received: by 2002:a62:d044:: with SMTP id p65-v6mr6677660pfg.64.1527157102547; Thu, 24 May 2018 03:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527157102; cv=none; d=google.com; s=arc-20160816; b=SX5qE6CJrA0RSGu5wnUULlGbwOGgc6vkxb79jYva7eNET22OKIBg9UoDWNgBmegCyZ TxFYzsvFdWpkxiBuHxLI31XN3U8gZq9AMSTM97w0yNL2w7pok4i3i2PbWw+uEImKN4xl JE8ooOy5eeNHEaowQUTaAvkadkaoERFT4wUj3UV1eKRr2+e4DyeeL7uGLxx+3mJ32l3U ptP7PpaN9qnaO02+pfve07xZ4t3vQaMDvGRgpxoQaW86kNN0T8Oyd8MlljeospGiSVsb FnPzR5tp4xTq4oU29rsOsuvOlamlOgXfTiFgCaSmBGrrM181AP2cf9RJvooRmpDya6Ky GMvw== 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=Tsln+yD6a3FG4kL51k4nsI69ycvkoIIILfB5KQ+mJF0=; b=ild2qllM42PqUPMW6VxWI+t3GABAG4cky0NL9wCjE1EYfN9tu6yQZpricp2mtyj9LD E8qog/S8oBWZOsv8IfHD6K9SJ2KXKOPAg88n0aIda3jLoobydfwSiYZX0kd5/kayqzxH CKgKvbMWVSGdIZAbXoCAGaPg3eggpzzHrJ75F3U8BFhoFp0KqwPn439BIcdUQvyIIJ+n YoWvxUZ9ocO032UJajdnK9UAmOUNAI/lrg77XmKny/a4inMmhcS7N1lHfB1zwU0S02A7 XNZqUBg8TtkEgglG0VPqiy1jKC/EzDSODDgX2xwgCp8C34aLnSxYbk6hwMjoStZo0Jp+ VLcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jXs1ahlg; 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 o33-v6si22562222pld.170.2018.05.24.03.18.08; Thu, 24 May 2018 03:18:22 -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=jXs1ahlg; 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 S1031385AbeEXKEJ (ORCPT + 99 others); Thu, 24 May 2018 06:04:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:53470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031344AbeEXKEC (ORCPT ); Thu, 24 May 2018 06:04:02 -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 9CBC820891; Thu, 24 May 2018 10:04:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156242; bh=FfRieWGcDKTeZRlClPLpf/E2UYXwlAm8HVAiq7/wzO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jXs1ahlgRB6hOO29sv15ICcBQnV0GppdpGOS93LyBHq9f7/Qw5Xamb2TuJ2ikEZqf AgJwnd43iw0Y/7bQA/3NOWrnbyftJuN3v6GJ9DNMIX8/FJV7k5l6NeoJmafZt0dIxe H0xRV6fLJCKny//suTMGWllY39pVmPq0rCtPbn6I= 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.16 098/161] crypto: inside-secure - wait for the request to complete if in the backlog Date: Thu, 24 May 2018 11:38:43 +0200 Message-Id: <20180524093030.148542659@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@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.16-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 @@ -845,7 +845,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; }