inet: add proper refcounting to request sock
authorEric Dumazet <edumazet@google.com>
Mon, 16 Mar 2015 04:12:16 +0000 (21:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Mar 2015 19:55:29 +0000 (15:55 -0400)
commit13854e5a60461daee08ce99842b7f4d37553d911
treef7bf7650ead7d8af1e93d98114da5cd1bf658956
parent2c13270b441054a9596bcd99c0f446603c9ad131
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>
include/net/inet_connection_sock.h
include/net/inet_sock.h
include/net/request_sock.h
net/core/request_sock.c
net/ipv4/inet_connection_sock.c
net/ipv4/syncookies.c
net/ipv4/tcp_fastopen.c