Skip to content

Commit

Permalink
tcp: fix a panic on UP machines in reqsk_fastopen_remove
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Jerry Chu <[email protected]>
Cc: Yuchung Cheng <[email protected]>
Cc: Dave Taht <[email protected]>
Acked-by: H.K. Jerry Chu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Jan 14, 2013
1 parent 3152ba0 commit cce894b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/core/request_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down

0 comments on commit cce894b

Please sign in to comment.