Netdev List
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Brad Bosch <bradbosch@comcast.net>
Cc: linux-crypto@vger.kernel.org, netdev@vger.kernel.org, offbase0@gmail.com
Subject: Re: Crypto oops in async_chainiv_do_postponed
Date: Wed, 2 Sep 2009 08:17:21 +1000	[thread overview]
Message-ID: <20090901221721.GA1964@gondor.apana.org.au> (raw)
In-Reply-To: <19101.16628.347039.619378@waldo.imnotcreative.homeip.net>

On Tue, Sep 01, 2009 at 10:42:44AM -0500, Brad Bosch wrote:
> 
> Now, ctx-err may be used by both async_chainiv_postpone_request to
> store the return value from skcipher_enqueue_givcrypt and by
> async_chainiv_givencrypt_tail to store the return value from
> crypto_ablkcipher_encrypt at the same time.  This can cause the
> calling function to think async_chainiv_givencrypt has completed it's
> work, when in fact, the work was defered.

async_chainiv_postpone_request never touches ctx->err unless
it can obtain the INUSE bit lock.  On the other hand, the normal
patch async_chainiv_givencrypt_tail never relinquishes the INUSE
bit until it is finisehd with ctx->err.
 
> OK.  I see now that your offset patch should indeed solve that
> problem.  But why did you choose to fix it in a complex way?  My
> suggestion just adds a single test while yours adds new parameters, a
> new function and an extra function call.

Because that introduces two NULL checks where the second one is
useless.  Not a big deal but then again, my patch wasn't that
complicated either :)

Please let me know whether it actually fixes your problem though
so I can get this upstream.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2009-09-01 22:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <19095.1264.682820.125602@waldo.imnotcreative.homeip.net>
2009-08-29 10:46 ` Crypto oops in async_chainiv_do_postponed Herbert Xu
2009-08-31 16:11   ` Brad Bosch
2009-08-31 22:04     ` Herbert Xu
2009-09-01 15:42       ` Brad Bosch
2009-09-01 22:17         ` Herbert Xu [this message]
2009-09-02 14:08           ` Brad Bosch
2009-09-02 21:57             ` Herbert Xu
2009-09-02 23:47               ` Brad Bosch
2009-09-03  1:53                 ` Herbert Xu
2009-09-02 14:23           ` Brad Bosch

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=20090901221721.GA1964@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=bradbosch@comcast.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=offbase0@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox