Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1825745pxb; Mon, 13 Sep 2021 06:24:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmnJXQ2ANaDoa4du5ELnFQPycYRCLYBoU/eP8oU0t5gp3kWOYRU6xI2ES8YDmE21dmEGws X-Received: by 2002:a05:6638:25d3:: with SMTP id u19mr7160986jat.78.1631539491007; Mon, 13 Sep 2021 06:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631539491; cv=none; d=google.com; s=arc-20160816; b=krtB+tuSufkG5uYfgsV+nBx8YjnHA3HLchvB2DlFt1lVxzzQxs/uTk6oEI9I7+YH/m JR+IzpvWSa88OGugbvQ3RX1N68ooA4PCALZFARJqTntItCSzIBpF3Ush59E1QFHFD7XH wt0GVUMpkLl264Ip4ZOyn/VCCXXonF4Yuj24iIqiHrkdW2efQIM8LB7pHI5eSaCsCsNN yDPC44nd3YmdDgO0xB3jJyNNFS/3ZBDBxQzDTzFwNXn7xB3U/CT9MTrklUwkXDnjevth YTtnWpb/aIsKuqUJmXXwRz71RrAa1KRWmXrSwpIywNbuM05wecK5aUxZ78mhA3yFRxeY bytg== 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=Gb1k3VDAHszV65xZTbAR0s1XBSCio+/yfYQtOyAG7aY=; b=q3K/GCJb7ch0SRkQ7DPafmXHXemeTCDH+DAxmz31YSCbo/xfgOtJP/xk0aLlE7N7fT P5B7KquZtgxshkvgKlA4J9roRpWscvvwClle0A/0jZuGZgPDYMnL9TaGCXMOfdN4P15G SSLEGaHrMTMxzZOh5OwmPL70wfHN6BXJcUz7UH2OFEmf3+BT5rFGvtjpHsA9mHiBKm3E NSFZfzzi0/ZTMYAbtJwXIxZHFwAM1BO0hCABKaI7qs5SwKMUgTFy9TeUG6jd0KKO/8w4 M+0b4Uvz/eaGKVsS9Uzyg5J4HZBmu9JMITAoHNdShs/vM/Qtl6xgYZfSjUJzV5t4tJ0f JNHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=khrs+7NP; 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 t24si6050652iog.114.2021.09.13.06.24.36; Mon, 13 Sep 2021 06:24:50 -0700 (PDT) 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=khrs+7NP; 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 S241614AbhIMNY0 (ORCPT + 99 others); Mon, 13 Sep 2021 09:24:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:34856 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240227AbhIMNUD (ORCPT ); Mon, 13 Sep 2021 09:20:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7F1AD610E7; Mon, 13 Sep 2021 13:18:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539101; bh=3Mmiju3sdqsKuvmqlxTn/k9pgMEyNG4h1nHPX3kcYFM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=khrs+7NPutnvEnr7Jk5RWqHvZxJnk41uFspP+BbZEL9m9RDApYLaW1nRH3tGMSKkh BccBgRvCcz9X9vRpRFaJEep0rdsfwpaWYnvmxyz05ZHJ1Y8yuCp7IO1bNWfkDrxlf+ n9GdTa0nIQI6p5pLtyDnBS//zXmZDHzzxqRssSEg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marco Chiappero , Giovanni Cabiddu , Fiona Trahe , Herbert Xu , Sasha Levin Subject: [PATCH 5.4 024/144] crypto: qat - fix reuse of completion variable Date: Mon, 13 Sep 2021 15:13:25 +0200 Message-Id: <20210913131048.761877564@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131047.974309396@linuxfoundation.org> References: <20210913131047.974309396@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: Marco Chiappero [ Upstream commit 3d655732b0199562267a05c7ff69ecdd11632939 ] Use reinit_completion() to set to a clean state a completion variable, used to coordinate the VF to PF request-response flow, before every new VF request. Signed-off-by: Marco Chiappero Co-developed-by: Giovanni Cabiddu Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/qat/qat_common/adf_pf2vf_msg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c index b3875fdf6cd7..9dab2cc11fdf 100644 --- a/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c +++ b/drivers/crypto/qat/qat_common/adf_pf2vf_msg.c @@ -361,6 +361,8 @@ static int adf_vf2pf_request_version(struct adf_accel_dev *accel_dev) msg |= ADF_PFVF_COMPATIBILITY_VERSION << ADF_VF2PF_COMPAT_VER_REQ_SHIFT; BUILD_BUG_ON(ADF_PFVF_COMPATIBILITY_VERSION > 255); + reinit_completion(&accel_dev->vf.iov_msg_completion); + /* Send request from VF to PF */ ret = adf_iov_putmsg(accel_dev, msg, 0); if (ret) { -- 2.30.2