Message ID | ad1ecbd205b357f1f73500522a2d495cb6c0cbe1.1719302367.git.tanggeliang@kylinos.cn |
---|---|
State | New |
Headers | show |
Series | [bpf-next,v2,1/4] skmsg: null check for sg_page in sk_msg_recvmsg | expand |
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index b24d74616637..34a719e98c69 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -434,7 +434,8 @@ int inet_release(struct socket *sock) if (sock_flag(sk, SOCK_LINGER) && !(current->flags & PF_EXITING)) timeout = sk->sk_lingertime; - sk->sk_prot->close(sk, timeout); + if (sk->sk_prot->close) + sk->sk_prot->close(sk, timeout); sock->sk = NULL; } return 0;