Re: [PATCH v4 1/2] crypto: skcipher AF_ALG - overhaul memory management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux