From: Herbert Xu <herbert@gondor.apana.org.au>
To: Tadeusz Struk <tadeusz.struk@intel.com>
Cc: smueller@chronox.de, linux-kernel@vger.kernel.org,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH v2 2/2] crypto: af_alg - add async support to algif_aead
Date: Thu, 10 Mar 2016 18:53:58 +0800 [thread overview]
Message-ID: <20160310105358.GA13907@gondor.apana.org.au> (raw)
In-Reply-To: <20160201191735.21093.36524.stgit@tstruk-mobl1>
On Mon, Feb 01, 2016 at 11:17:35AM -0800, Tadeusz Struk wrote:
>
> @@ -240,6 +255,7 @@ static int aead_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
> if (!aead_writable(sk)) {
> /* user space sent too much data */
> aead_put_sgl(sk);
> + aead_reset_ctx(ctx);
It seems that every call to aead_put_sgl is followed by a call to
aead_reset_ctx. So how about calling the latter from aead_put_sgl
directly?
> + while (atomic_read(&sk->sk_refcnt) != 0 && ctr++ < 10)
> + msleep(100);
>
> + WARN_ON(atomic_read(&sk->sk_refcnt) != 0);
The whole point of using sock_hold is to get rid of the wait so
why is this still needed?
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2016-03-10 10:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 19:17 [PATCH v2 1/2] crypto: aead - move aead_request_cast helper to aead.h Tadeusz Struk
2016-02-01 19:17 ` [PATCH v2 2/2] crypto: af_alg - add async support to algif_aead Tadeusz Struk
2016-03-10 10:53 ` Herbert Xu [this message]
2016-02-06 7:46 ` [PATCH v2 1/2] crypto: aead - move aead_request_cast helper to aead.h Herbert Xu
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=20160310105358.GA13907@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=smueller@chronox.de \
--cc=tadeusz.struk@intel.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;
as well as URLs for NNTP newsgroup(s).