crypto: af_alg - Make sure sk_security is initialized on accept()ed sockets
authorMiloslav Trmač <mitr@redhat.com>
Wed, 8 Dec 2010 06:36:19 +0000 (14:36 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 8 Dec 2010 06:36:19 +0000 (14:36 +0800)
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/af_alg.c

index cabed0e9c9d810e2ab3f7a960ded69ed207bc8e5..bd9e53c780269d593cbf58f2fd589c4ddad5fa7b 100644 (file)
@@ -242,6 +242,7 @@ int af_alg_accept(struct sock *sk, struct socket *newsock)
                goto unlock;
 
        sock_init_data(newsock, sk2);
+       sock_graft(sk2, newsock);
 
        err = type->accept(ask->private, sk2);
        if (err) {