Skip to content

Commit

Permalink
inet: remove BUG_ON() in twsk_destructor()
Browse files Browse the repository at this point in the history
Kernel will crash the same if one of the pointer is NULL anyway.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jul 9, 2015
1 parent 8b58a39 commit 3fd2f1b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions include/net/timewait_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ static inline int twsk_unique(struct sock *sk, struct sock *sktw, void *twp)

static inline void twsk_destructor(struct sock *sk)
{
BUG_ON(sk == NULL);
BUG_ON(sk->sk_prot == NULL);
BUG_ON(sk->sk_prot->twsk_prot == NULL);
if (sk->sk_prot->twsk_prot->twsk_destructor != NULL)
sk->sk_prot->twsk_prot->twsk_destructor(sk);
}
Expand Down

0 comments on commit 3fd2f1b

Please sign in to comment.