diff --git a/include/net/sock.h b/include/net/sock.h index 48e4d5c38f855433c4e41af9b4ebac6eea8bb754..8c85791fc196c90d0ca52f8a6fadc65cf2faa479 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1697,6 +1697,7 @@ static inline void sock_orphan(struct sock *sk) static inline void sock_graft(struct sock *sk, struct socket *parent) { + WARN_ON(parent->sk); write_lock_bh(&sk->sk_callback_lock); sk->sk_wq = parent->wq; parent->sk = sk;