diff options
Diffstat (limited to 'net/ipv4/tcp_bpf.c')
| -rw-r--r-- | net/ipv4/tcp_bpf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/tcp_bpf.c b/net/ipv4/tcp_bpf.c index 1bb7321a256d..3d1e15401384 100644 --- a/net/ipv4/tcp_bpf.c +++ b/net/ipv4/tcp_bpf.c | |||
| @@ -27,7 +27,10 @@ static int tcp_bpf_wait_data(struct sock *sk, struct sk_psock *psock, | |||
| 27 | int flags, long timeo, int *err) | 27 | int flags, long timeo, int *err) |
| 28 | { | 28 | { |
| 29 | DEFINE_WAIT_FUNC(wait, woken_wake_function); | 29 | DEFINE_WAIT_FUNC(wait, woken_wake_function); |
| 30 | int ret; | 30 | int ret = 0; |
| 31 | |||
| 32 | if (!timeo) | ||
| 33 | return ret; | ||
| 31 | 34 | ||
| 32 | add_wait_queue(sk_sleep(sk), &wait); | 35 | add_wait_queue(sk_sleep(sk), &wait); |
| 33 | sk_set_bit(SOCKWQ_ASYNC_WAITDATA, sk); | 36 | sk_set_bit(SOCKWQ_ASYNC_WAITDATA, sk); |
| @@ -528,8 +531,6 @@ static void tcp_bpf_remove(struct sock *sk, struct sk_psock *psock) | |||
| 528 | { | 531 | { |
| 529 | struct sk_psock_link *link; | 532 | struct sk_psock_link *link; |
| 530 | 533 | ||
| 531 | sk_psock_cork_free(psock); | ||
| 532 | __sk_psock_purge_ingress_msg(psock); | ||
| 533 | while ((link = sk_psock_link_pop(psock))) { | 534 | while ((link = sk_psock_link_pop(psock))) { |
| 534 | sk_psock_unlink(sk, link); | 535 | sk_psock_unlink(sk, link); |
| 535 | sk_psock_free_link(link); | 536 | sk_psock_free_link(link); |
