All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
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()
Date: Tue, 2 Mar 2021 09:39:27 -0800	[thread overview]
Message-ID: <YD54T+WRkGIrpuTM@sol.localdomain> (raw)
In-Reply-To: <20210302075530.29315-1-ardb@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 <ebiggers@google.com>

- Eric

      reply	other threads:[~2021-03-03  1:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02  7:55 [PATCH v2] crypto: api - check for ERR pointers in crypto_destroy_tfm() Ard Biesheuvel
2021-03-02 17:39 ` Eric Biggers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YD54T+WRkGIrpuTM@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=ardb@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=syzbot+12cf5fbfdeba210a89dd@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.