Lines Matching defs:sk
32 static int hash_alloc_result(struct sock *sk, struct hash_ctx *ctx)
41 ctx->result = sock_kmalloc(sk, ds, GFP_KERNEL);
50 static void hash_free_result(struct sock *sk, struct hash_ctx *ctx)
59 sock_kzfree_s(sk, ctx->result, ds);
66 struct sock *sk = sock->sk;
67 struct alg_sock *ask = alg_sk(sk);
75 DIV_ROUND_UP(sk->sk_sndbuf, PAGE_SIZE));
77 lock_sock(sk);
82 hash_free_result(sk, ctx);
92 err = hash_alloc_result(sk, ctx);
127 err = hash_alloc_result(sk, ctx);
168 release_sock(sk);
174 hash_free_result(sk, ctx);
182 struct sock *sk = sock->sk;
183 struct alg_sock *ask = alg_sk(sk);
194 lock_sock(sk);
196 err = hash_alloc_result(sk, ctx);
220 hash_free_result(sk, ctx);
221 release_sock(sk);
229 struct sock *sk = sock->sk;
230 struct alg_sock *ask = alg_sk(sk);
247 lock_sock(sk);
250 release_sock(sk);
259 sk2 = newsock->sk;
304 struct sock *sk = sock->sk;
305 struct alg_sock *ask = alg_sk(sk);
307 lock_sock(sk);
328 release_sock(sk);
402 static void hash_sock_destruct(struct sock *sk)
404 struct alg_sock *ask = alg_sk(sk);
407 hash_free_result(sk, ctx);
408 sock_kfree_s(sk, ctx, ctx->len);
409 af_alg_release_parent(sk);
412 static int hash_accept_parent_nokey(void *private, struct sock *sk)
415 struct alg_sock *ask = alg_sk(sk);
419 ctx = sock_kmalloc(sk, len, GFP_KERNEL);
434 sk->sk_destruct = hash_sock_destruct;
439 static int hash_accept_parent(void *private, struct sock *sk)
446 return hash_accept_parent_nokey(private, sk);