Linux cryptographic layer development
 help / color / mirror / Atom feed
From: "Stephan Müller" <smueller@chronox.de>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH v4 1/2] crypto: skcipher AF_ALG - overhaul memory management
Date: Fri, 17 Feb 2017 20:30:35 +0100	[thread overview]
Message-ID: <2417522.uQb4Sb1iXM@positron.chronox.de> (raw)
In-Reply-To: <3126581.xcUJNzAaop@positron.chronox.de>

Am Donnerstag, 16. Februar 2017, 22:21:44 CET schrieb Stephan Müller:

Hi,

> +static unsigned int skcipher_count_tsgl(struct sock *sk, size_t bytes)
>  {
>  	struct alg_sock *ask = alg_sk(sk);
>  	struct skcipher_ctx *ctx = ask->private;
> -	struct skcipher_sg_list *sgl;
> +	struct skcipher_tsgl *sgl;
>  	struct scatterlist *sg;
> -	int i;
> +	unsigned int i;
> +	unsigned int sgl_count = 0;
> +
> +	if (!bytes)
> +		return 0;
> +
> +	while (!list_empty(&ctx->tsgl_list)) {

This is wrong, it should be list_for_each_entry_safe(sgl, tmp, &ctx-
>tsgl_list, list) {

I will send a new patch shortly.

Ciao
Stephan

  reply	other threads:[~2017-02-17 19:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 21:20 [PATCH v4 0/2] crypto: AF_ALG memory management fix Stephan Müller
2017-02-16 21:21 ` [PATCH v4 1/2] crypto: skcipher AF_ALG - overhaul memory management Stephan Müller
2017-02-17 19:30   ` Stephan Müller [this message]
2017-02-16 21:22 ` [PATCH v4 2/2] crypto: aead " Stephan Müller

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=2417522.uQb4Sb1iXM@positron.chronox.de \
    --to=smueller@chronox.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox