From: Eric Dumazet Date: Sun, 13 Jan 2013 18:21:51 +0000 (+0000) Subject: tcp: fix a panic on UP machines in reqsk_fastopen_remove X-Git-Tag: v3.7.8~42 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d0f5d39ef79b9b4023f51664e15a5373ea3ea9eb;p=karo-tx-linux.git tcp: fix a panic on UP machines in reqsk_fastopen_remove [ Upstream commit cce894bb824429fd312706c7012acae43e725865 ] 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 Signed-off-by: Eric Dumazet Cc: Jerry Chu Cc: Yuchung Cheng Cc: Dave Taht Acked-by: H.K. Jerry Chu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/core/request_sock.c b/net/core/request_sock.c index c31d9e8668c3..4425148d2b51 100644 --- a/net/core/request_sock.c +++ b/net/core/request_sock.c @@ -186,8 +186,6 @@ void reqsk_fastopen_remove(struct sock *sk, struct request_sock *req, struct fastopen_queue *fastopenq = inet_csk(lsk)->icsk_accept_queue.fastopenq; - BUG_ON(!spin_is_locked(&sk->sk_lock.slock) && !sock_owned_by_user(sk)); - tcp_sk(sk)->fastopen_rsk = NULL; spin_lock_bh(&fastopenq->lock); fastopenq->qlen--;