Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp982831pxb; Wed, 3 Mar 2021 23:26:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyTf7q7jQOZQGabGgw2UvW9UgOhN+VL0f31mp/ND6vIaGBmbp5vgz6L1u6BbwQe5wa6Of5b X-Received: by 2002:a17:906:22d2:: with SMTP id q18mr2762825eja.437.1614842799788; Wed, 03 Mar 2021 23:26:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614842799; cv=none; d=google.com; s=arc-20160816; b=noGnwjw8Q24byozAKn8N+fSeOeBGe7uNQJONCiwoARxde0BVpmKDe5KUzcmX3z/mW5 I0hrmklXBjn2nrDRzQSocCZVW/St/jTViJ/tZoc2GRPt/lb32v2RqXzN8xTLQE5SHgy/ r2qXnQ5zPOO63HfpMhquRHPHPvh00nobE+Gcs/SOxtNl1o/igFrcTAWq1Q5gzDKs1fRP JibZdcZG1bp09Jc7n5lkA+XVvv2AJkF+jdew6Ey5Kmg94q0WeYBKMOKOAItAhw24yi5V 0H2oLdROKL5dVcWnzZ5L+5Q3eo7u7FL8NY5k/4JMTsIQFnPW7GQJb55bfODAD55pulXi 7mrw== 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:dkim-signature; bh=6h5LcfRQpzHm5V4/OFiE/2aw36x40NGYLmMsa//ttzk=; b=n/8IypH79czRed14DHWYLhqz+ehGNIB5oQkYyxJj66oBxP6Pfi62QJD9rREnnKG3aw TZuNHb7+SL4wW0KLE9XzQwYwsIoNhwmTYmf6g/nVqvW2GE4T0oUDi1WvBIqmpCv36vvf vVJQ1ijozqFxGMjZOYHZ39mqJhGOpHYw7MuM5V7rgZLpIraNPN4FEvWGbSqIZ8TR9L/M 4vgHnQwPgYORGDuXFSwfUk0a72Hy5mAAXq7CEYXE2uemcPxfplr5ZKIxKS+zw3RkbGUz CplO1sjTkWAbMAA9u6ZNbhGCwlELmDh+j7kvALQrxV7PTQYvc0+0Mi9UGJ5uoytXCgme PHYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=saP8zQTE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w26si14329104eju.454.2021.03.03.23.26.16; Wed, 03 Mar 2021 23:26:39 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=saP8zQTE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239570AbhCCBhj (ORCPT + 99 others); Tue, 2 Mar 2021 20:37:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:55688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245418AbhCBRkL (ORCPT ); Tue, 2 Mar 2021 12:40:11 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9095B64F12; Tue, 2 Mar 2021 17:39:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614706768; bh=4PXtG4bGHaK3TW0WRz7auQNev9K7TX4p38IsgAbYnD8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=saP8zQTEbv/NcJLYrTMmiXD6bkhHfu2t2/LvegFwZ9NBF6Fx7unIYUj7Y7EN84RAd GiQh3MctYKRRPCF20js89xqPIstrwfCGWxJ6SEluS2A1cXpm1EL9HKf/uIMJdeYPph WHw17HpKN2iDcgH3fPg28FKzWcbWJxtZdNmET8+ia4rw3waf9qqgDLF2gnutcOxOr6 3vA+jNrIurUdRNfPfLFescY7CrwSzEChFSC2gueMwl3nkpEuDC2GEr5cvNZo5oe+ly cTTNdrTfy1yDkSHoKQowA94FYP36M8eT9RvYswsnOWCi+Lr6jy0sAlEvgs7bF/IJ8A NZtpnSFUHs0NQ== Date: Tue, 2 Mar 2021 09:39:27 -0800 From: Eric Biggers To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, syzbot+12cf5fbfdeba210a89dd@syzkaller.appspotmail.com Subject: Re: [PATCH v2] crypto: api - check for ERR pointers in crypto_destroy_tfm() Message-ID: References: <20210302075530.29315-1-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210302075530.29315-1-ardb@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Mar 02, 2021 at 08:55:30AM +0100, Ard Biesheuvel wrote: > diff --git a/include/crypto/hash.h b/include/crypto/hash.h > index 13f8a6a54ca8..f065dbe2205c 100644 > --- a/include/crypto/hash.h > +++ b/include/crypto/hash.h > @@ -281,6 +281,8 @@ static inline struct crypto_tfm *crypto_ahash_tfm(struct crypto_ahash *tfm) > /** > * crypto_free_ahash() - zeroize and free the ahash handle > * @tfm: cipher handle to be freed > + * > + * If @tfm is a NULL or error pointer, this function does nothing. > */ > static inline void crypto_free_ahash(struct crypto_ahash *tfm) > { You missed crypto_free_shash(). Otherwise this looks good, feel free to add: Reviewed-by: Eric Biggers - Eric