netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, herbert@gondor.apana.org.au,
	rusty@rustcorp.com.au
Subject: Re: [PATCH]: Fix networking scatterlist regressions.
Date: Wed, 31 Oct 2007 08:46:21 +0100	[thread overview]
Message-ID: <20071031074621.GB5059@kernel.dk> (raw)
In-Reply-To: <20071030.204002.193703502.davem@davemloft.net>

On Tue, Oct 30 2007, David Miller wrote:
> diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c
> index 91cd8f0..4a8aa94 100644
> --- a/net/sunrpc/auth_gss/gss_krb5_crypto.c
> +++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c
> @@ -211,8 +211,8 @@ encryptor(struct scatterlist *sg, void *data)
>  	if (thislen == 0)
>  		return 0;
>  
> -	sg_mark_end(desc->infrags, desc->fragno);
> -	sg_mark_end(desc->outfrags, desc->fragno);
> +	__sg_mark_end(desc->infrags, desc->fragno);
> +	__sg_mark_end(desc->outfrags, desc->fragno);
>  
>  	ret = crypto_blkcipher_encrypt_iv(&desc->desc, desc->outfrags,
>  					  desc->infrags, thislen);
> @@ -293,7 +293,7 @@ decryptor(struct scatterlist *sg, void *data)
>  	if (thislen == 0)
>  		return 0;
>  
> -	sg_mark_end(desc->frags, desc->fragno);
> +	__sg_mark_end(desc->frags, desc->fragno);
>  
>  	ret = crypto_blkcipher_decrypt_iv(&desc->desc, desc->frags,
>  					  desc->frags, thislen);

Hmm? These don't seem right. It also has a weird code sequence:

...
        sg_mark_end(&desc->infrags[desc->fragno - 1]);
        sg_mark_end(&desc->outfrags[desc->fragno - 1]);

        ret = crypto_blkcipher_encrypt_iv(&desc->desc, desc->outfrags,
                                          desc->infrags, thislen);
        if (ret)
                return ret;

        sg_init_table(desc->infrags, 4);
        sg_init_table(desc->outfrags, 4);
...

Did something go wrong there?

-- 
Jens Axboe


  parent reply	other threads:[~2007-10-31  7:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31  3:40 [PATCH]: Fix networking scatterlist regressions David Miller
2007-10-31  6:06 ` Rusty Russell
2007-10-31  6:44   ` David Miller
2007-10-31  7:32 ` Jens Axboe
2007-10-31  7:43   ` David Miller
2007-10-31  7:47     ` Jens Axboe
2007-10-31  7:46 ` Jens Axboe [this message]
2007-10-31  7:58   ` David Miller
2007-10-31  8:01     ` Jens Axboe
2007-10-31  8:08       ` David Miller
2007-10-31  8:08         ` Jens Axboe
2007-10-31  8:14     ` Jens Axboe
2007-10-31  9:26       ` David Miller
2007-10-31  9:29         ` Jens Axboe
2007-10-31 13:45 ` Herbert Xu
2007-10-31 13:46   ` Jens Axboe

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=20071031074621.GB5059@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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;
as well as URLs for NNTP newsgroup(s).