inet: add proper refcounting to request sock
reqsk_put() is the generic function that should be used to release a refcount (and automatically call reqsk_free()) reqsk_free() might be called if refcount is known to be 0 or undefined. refcnt is set to one in inet_csk_reqsk_queue_add() As request socks are not yet in global ehash table, I added temporary debugging checks in reqsk_put() and reqsk_free() Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
2c13270b44
commit
13854e5a60
@@ -253,7 +253,7 @@ static bool tcp_fastopen_queue_check(struct sock *sk)
|
||||
fastopenq->rskq_rst_head = req1->dl_next;
|
||||
fastopenq->qlen--;
|
||||
spin_unlock(&fastopenq->lock);
|
||||
reqsk_free(req1);
|
||||
reqsk_put(req1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user