From patchwork Thu Dec 22 15:00:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Cabiddu, Giovanni" X-Patchwork-Id: 9485115 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3121C601D4 for ; Thu, 22 Dec 2016 15:01:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21BE3280F4 for ; Thu, 22 Dec 2016 15:01:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1686C28135; Thu, 22 Dec 2016 15:01:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BED0D280F4 for ; Thu, 22 Dec 2016 15:01:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941129AbcLVPBL (ORCPT ); Thu, 22 Dec 2016 10:01:11 -0500 Received: from mga05.intel.com ([192.55.52.43]:15580 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934269AbcLVPA5 (ORCPT ); Thu, 22 Dec 2016 10:00:57 -0500 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP; 22 Dec 2016 07:00:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,388,1477983600"; d="scan'208";a="45463392" Received: from silvixa00391824.ir.intel.com (HELO silvixa00391824.ger.corp.intel.com) ([10.237.223.194]) by orsmga005.jf.intel.com with ESMTP; 22 Dec 2016 07:00:54 -0800 From: Giovanni Cabiddu To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, giovanni.cabiddu@gmail.com, Giovanni Cabiddu , Sushil Kumar Subject: [PATCH] crypto: qat - initialize cra_flags before register into kpp Date: Thu, 22 Dec 2016 15:00:51 +0000 Message-Id: <20161222150051.6284-1-giovanni.cabiddu@intel.com> X-Mailer: git-send-email 2.9.3 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Initialize dh.base.cra_flags before registering the dh algorithm. Without this fix, the registration of the dh algorithm might fail if the qat driver is restarted. Signed-off-by: Sushil Kumar Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_asym_algs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c b/drivers/crypto/qat/qat_common/qat_asym_algs.c index 0d35dca..d3518e6 100644 --- a/drivers/crypto/qat/qat_common/qat_asym_algs.c +++ b/drivers/crypto/qat/qat_common/qat_asym_algs.c @@ -1343,6 +1343,7 @@ int qat_asym_algs_register(void) ret = crypto_register_akcipher(&rsa); if (ret) goto unlock; + dh.base.cra_flags = 0; ret = crypto_register_kpp(&dh); } unlock: