Commit cce894bb824429fd312706c7012acae43e725865

Authored by Eric Dumazet
Committed by David S. Miller
1 parent 3152ba0f86

tcp: fix a panic on UP machines in reqsk_fastopen_remove

spin_is_locked() on a non !SMP build is kind of useless.

BUG_ON(!spin_is_locked(xx)) is guaranteed to crash.

Just remove this check in reqsk_fastopen_remove() as
the callers do hold the socket lock.

Reported-by: Ketan Kulkarni <ketkulka@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jerry Chu <hkchu@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Dave Taht <dave.taht@gmail.com>
Acked-by: H.K. Jerry Chu <hkchu@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 0 additions and 2 deletions Side-by-side Diff

net/core/request_sock.c
... ... @@ -186,8 +186,6 @@
186 186 struct fastopen_queue *fastopenq =
187 187 inet_csk(lsk)->icsk_accept_queue.fastopenq;
188 188  
189   - BUG_ON(!spin_is_locked(&sk->sk_lock.slock) && !sock_owned_by_user(sk));
190   -
191 189 tcp_sk(sk)->fastopen_rsk = NULL;
192 190 spin_lock_bh(&fastopenq->lock);
193 191 fastopenq->qlen--;