• Home
  • Raw
  • Download

Lines Matching refs:sk

40 	struct sock *sk = sock->sk;  in skcipher_sendmsg()  local
41 struct alg_sock *ask = alg_sk(sk); in skcipher_sendmsg()
53 struct sock *sk = sock->sk; in _skcipher_recvmsg() local
54 struct alg_sock *ask = alg_sk(sk); in _skcipher_recvmsg()
65 err = af_alg_wait_for_data(sk, flags); in _skcipher_recvmsg()
71 areq = af_alg_alloc_areq(sk, sizeof(struct af_alg_async_req) + in _skcipher_recvmsg()
77 err = af_alg_get_rsgl(sk, msg, flags, areq, -1, &len); in _skcipher_recvmsg()
96 areq->tsgl_entries = af_alg_count_tsgl(sk, len, 0); in _skcipher_recvmsg()
99 areq->tsgl = sock_kmalloc(sk, array_size(sizeof(*areq->tsgl), in _skcipher_recvmsg()
107 af_alg_pull_tsgl(sk, len, areq->tsgl, 0); in _skcipher_recvmsg()
116 sock_hold(sk); in _skcipher_recvmsg()
133 sock_put(sk); in _skcipher_recvmsg()
156 struct sock *sk = sock->sk; in skcipher_recvmsg() local
159 lock_sock(sk); in skcipher_recvmsg()
181 af_alg_wmem_wakeup(sk); in skcipher_recvmsg()
182 release_sock(sk); in skcipher_recvmsg()
214 struct sock *sk = sock->sk; in skcipher_check_key() local
215 struct alg_sock *ask = alg_sk(sk); in skcipher_check_key()
217 lock_sock(sk); in skcipher_check_key()
241 release_sock(sk); in skcipher_check_key()
319 static void skcipher_sock_destruct(struct sock *sk) in skcipher_sock_destruct() argument
321 struct alg_sock *ask = alg_sk(sk); in skcipher_sock_destruct()
327 af_alg_pull_tsgl(sk, ctx->used, NULL, 0); in skcipher_sock_destruct()
328 sock_kzfree_s(sk, ctx->iv, crypto_skcipher_ivsize(tfm)); in skcipher_sock_destruct()
329 sock_kfree_s(sk, ctx, ctx->len); in skcipher_sock_destruct()
330 af_alg_release_parent(sk); in skcipher_sock_destruct()
333 static int skcipher_accept_parent_nokey(void *private, struct sock *sk) in skcipher_accept_parent_nokey() argument
336 struct alg_sock *ask = alg_sk(sk); in skcipher_accept_parent_nokey()
340 ctx = sock_kmalloc(sk, len, GFP_KERNEL); in skcipher_accept_parent_nokey()
344 ctx->iv = sock_kmalloc(sk, crypto_skcipher_ivsize(tfm), in skcipher_accept_parent_nokey()
347 sock_kfree_s(sk, ctx, len); in skcipher_accept_parent_nokey()
364 sk->sk_destruct = skcipher_sock_destruct; in skcipher_accept_parent_nokey()
369 static int skcipher_accept_parent(void *private, struct sock *sk) in skcipher_accept_parent() argument
376 return skcipher_accept_parent_nokey(private, sk); in skcipher_accept_parent()