linux-stable/include
Guillaume Nault 9403cf2302 tcp: free request sock directly upon TFO or syncookies error
Since the request socket is created locally, it'd make more sense to
use reqsk_free() instead of reqsk_put() in TFO and syncookies' error
path.

However, tcp_get_cookie_sock() may set ->rsk_refcnt before freeing the
socket; tcp_conn_request() may also have non-null ->rsk_refcnt because
of tcp_try_fastopen(). In both cases 'req' hasn't been exposed
to the outside world and is safe to free immediately, but that'd
trigger the WARN_ON_ONCE in reqsk_free().

Define __reqsk_free() for these situations where we know nobody's
referencing the socket, even though ->rsk_refcnt might be non-null.
Now we can consolidate the error path of tcp_get_cookie_sock() and
tcp_conn_request().

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-19 14:13:01 -07:00
..
acpi ACPI updates for 5.1-rc1 2019-03-06 13:33:11 -08:00
asm-generic Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-03-10 14:46:56 -07:00
clocksource
crypto
drm drm next pull request for 5.1 2019-03-08 08:23:15 -08:00
dt-bindings We have a fairly balanced mix of clk driver updates and clk framework 2019-03-14 08:46:17 -07:00
keys Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-03-10 17:32:04 -07:00
kvm
linux Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-03-16 12:20:08 -07:00
math-emu
media
memory
misc
net tcp: free request sock directly upon TFO or syncookies error 2019-03-19 14:13:01 -07:00
pcmcia
ras
rdma
scsi
soc IOMMU Updates for Linux v5.1 2019-03-10 12:29:52 -07:00
sound Char/Misc driver patches for 5.1-rc1 2019-03-06 14:18:59 -08:00
target
trace dmaengine updates for v5.1-rc1 2019-03-14 09:11:54 -07:00
uapi tipc: support broadcast/replicast configurable for bc-link 2019-03-19 13:56:17 -07:00
video media updates for v5.1-rc1 2019-03-09 14:45:54 -08:00
xen