Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp443945rwl; Fri, 4 Nov 2022 02:13:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM79STgZPRJ6DPOPNCV2JNQViJpShtmyiyE2aGac8ipD/pwdRnhrOH0TC+G9fa+rJZkB42qQ X-Received: by 2002:a17:907:75d0:b0:7ad:8a7a:1a53 with SMTP id jl16-20020a17090775d000b007ad8a7a1a53mr32946339ejc.47.1667553238416; Fri, 04 Nov 2022 02:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667553238; cv=none; d=google.com; s=arc-20160816; b=nNldyTeDqct8YH6Ga4f3rCaEZkVVTGzZczmQXmvDegb/URnzf4UTzC1ZfdiqPMJSUC lpcLa9VgxHRu5KUGzEVSz72ayO7vlXs1neY4nhgCQiCr+K+rBKyiuZu1g+l/6EeDJL8Y 8lBl+YlUeMGO9wPc7lBVjEkMxepHpKjkFeHuUfLRLOIpk/SGe66/E2Itl+6L5Y4mRota hAmdMwQunGIGsICRXp5tWAX8fA5el48KqwLGDwk73aNr2ebwdQFsre2ZKcVtRcHxH5dM oJT73JLWm1lAUtuo/ihRsMaVwnw5VfxZy/wcjQqFNQFnEDtl9l1NZ1fPmOy4zQBNsADV otjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ds6R2+cIP/8HTkW3Ohj1lIcYjQ3k5gIG320BbXa9EDM=; b=tUoUXEIAb6xcPKiYPgDBlkda102HoSryP1G7dmttHkmx2yVd9TzhXFFCNdtUjB1qdk aWpRfLAlOa0JeH+jnoDvLFijE8RkQfT8p8Q9XtDgjr1waP5FD9gKIIy6NMkGY4M17E9Z AeRy/UTdoKB992UjSlbamlL/iaDOa0jMEKvTDnm76vtDfPeNxyIwxlwM80nbAAHDG/jH cb3SAm9Tb4bQu++CV6H/7kqYV0qZi1WXsjWEVuB0gnel33BcBEaujfNpd8FsrVCMuwNs a6Q6X6zomEgHcqlIXySg7PjLAlC5VbH+brqA3u+7QWZWjAt3seAVOAb3yJDSiYFTTMTj cNqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a170906538c00b007adbc807ca8si3412787ejo.137.2022.11.04.02.13.34; Fri, 04 Nov 2022 02:13:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230051AbiKDJJO (ORCPT + 99 others); Fri, 4 Nov 2022 05:09:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiKDJJM (ORCPT ); Fri, 4 Nov 2022 05:09:12 -0400 Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD2E095BA; Fri, 4 Nov 2022 02:09:09 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1oqsgV-00A1gl-5n; Fri, 04 Nov 2022 17:08:56 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 04 Nov 2022 17:08:55 +0800 Date: Fri, 4 Nov 2022 17:08:55 +0800 From: Herbert Xu To: liulongfang Cc: wangzhou1@hisilicon.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto/hisilicon: Add null judgment to the callback interface Message-ID: References: <20220930024320.29922-1-liulongfang@huawei.com> <717adf23-3080-5041-14ed-6ab5dcaddbf9@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sat, Oct 29, 2022 at 09:25:18AM +0800, liulongfang wrote: > > The context of the problem may not have been clearly stated in the previous > description. > > This is a problem found in one of our real user scenarios: > In this scenario of using an accelerator to perform encryption services, > it was originally intended to use the CPU to perform encryption services > in synchronous mode (without loading the hardware device driver, and without > registering the asynchronous callback function), but due to a deployment > error, the Hisi hardware device driver was loaded into the system, > this wrong operation causes the encryption service to call the device > driver of the hisi hardware, but the hardware device driver executes the > asynchronous mode, so the callback interface is called after the service > is completed. > This leads to this system calltrace problem. > > The purpose of this patch is to ensure that the device does not appear > calltrace in this abnormal situation. I'm still having trouble understanding this. Please give an exact call-trace that triggers the callback with a NULL callback pointer. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt