Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1132668ybt; Wed, 8 Jul 2020 22:36:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIbW+8kSCTKyfkVvwORso00b8Y6MlJOCcMk8XL4Ri9P35wupPS0gRDv3p30Mc8HnNQyR2p X-Received: by 2002:a17:906:a459:: with SMTP id cb25mr54378747ejb.234.1594273014244; Wed, 08 Jul 2020 22:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594273014; cv=none; d=google.com; s=arc-20160816; b=bdvM/0po0CEG9IJNJ596F1MZk0mhAnZ15ODFscRoV6QZTUulzmV/U9JT3m/e2YNwN6 p1VC27MYpx6vENQnc+5X5YmFusFTqIUmpP9OTTyAP4RD8zJa2+9yzFFfvAjSCUBN9WH+ dVWI0pCykO5P6gazf+7j81DlzbDOR1j5Zy06O1NPKyC1Lgb6aSAJwAJqxUx4hleyUW6v rHigwK8AD90feiOJRnm1KTBdeD2wPl4kkVrFjiuWX+mm2DgAK+aNEapnoVP1MqFxgPpG 5HTH/pig+N5ZzohIbBUYRiUqjsfuiJNuarJTFhlkIbl2HYM79axUX9LxFElCjB02/3pV dxBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3UU+7voCygY7BOfzdawvZm+sr7IgCjPwlijx1kssLTo=; b=J74iKWttMx2uossP1BGuADsXohzV3G0z8vDSCeNwKLh4snm7Am9oVJISNzrP7x3GXd l7tkVhBPspmK1J5MyQ68Z9t9lXZGZ+/VopHDdNFkCXBXsbc8HR4mSjcbV3KK80A2wo94 oWS2wtXlPe40OJ0RB4UesnCKweUwDvpMkGP9339tbsRuv1uWga9TLKiShRKd4QdZOeBh G1oDYZNOp3ymsJo6bIvUSnBrgj7LLG4A9t2bXKijSPaRKH4C6m+U4NbIejWlT0KEM3XT qJ6+2qjwSJkFMcIQL9pSktnqd/wpcsHQDNHDN+scygH0ih5IpkaIX12AlHpPUdNE8piD LNAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s9si1344860edw.12.2020.07.08.22.36.30; Wed, 08 Jul 2020 22:36:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726091AbgGIFg3 (ORCPT + 99 others); Thu, 9 Jul 2020 01:36:29 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:34830 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726129AbgGIFg3 (ORCPT ); Thu, 9 Jul 2020 01:36:29 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1jtPEJ-0004jF-5c; Thu, 09 Jul 2020 15:36:20 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 09 Jul 2020 15:36:19 +1000 Date: Thu, 9 Jul 2020 15:36:19 +1000 From: Herbert Xu To: Yang Shen Cc: davem@davemloft.net, linux-crypto@vger.kernel.org, xuzaibo@huawei.com, wangzhou1@hisilicon.com Subject: Re: [Patch v2 8/9] crypto: hisilicon/qm - fix the process of register algorithms to crypto Message-ID: <20200709053619.GA5637@gondor.apana.org.au> References: <1593587995-7391-1-git-send-email-shenyang39@huawei.com> <1593587995-7391-9-git-send-email-shenyang39@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1593587995-7391-9-git-send-email-shenyang39@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Jul 01, 2020 at 03:19:54PM +0800, Yang Shen wrote: > When the devices are removed or not existing, the corresponding algorithms > which are registered by 'hisi-zip' driver can't be used. > > Move 'hisi_zip_register_to_crypto' from 'hisi_zip_init' to > 'hisi_zip_probe'. The algorithms will be registered to crypto only when > there is device bind on the driver. And when the devices are removed, > the algorithms will be unregistered. You can't just unregister a live algorithm because if someone holds a reference count on it then the Crypto API will crash. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt