lkml.org 
[lkml]   [2016]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] crypto: af_alg - add async support to algif_aead
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

\
 
 \ /
  Last update: 2016-03-10 12:41    [W:0.057 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site