From patchwork Mon Jan 14 04:21:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: tcp: fix a panic on UP machines in reqsk_fastopen_remove Date: Sun, 13 Jan 2013 18:21:51 -0000 From: Eric Dumazet X-Patchwork-Id: 211701 Message-Id: <1358137311.8744.1590.camel@edumazet-glaptop> To: David Miller Cc: netdev , Ketan Kulkarni , Jerry Chu , Yuchung Cheng From: Eric Dumazet 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 --- net/core/request_sock.c | 2 -- 1 file changed, 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/core/request_sock.c b/net/core/request_sock.c index c31d9e8..4425148 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--;