freebsd-dev/sys/netinet/cc
Lawrence Stewart 9891578a40 Plug a memory leak and potential NULL-pointer dereference introduced in r331214.
Each TCP connection that uses the system default cc_newreno(4) congestion
control algorithm module leaks a "struct newreno" (8 bytes of memory) at
connection initialisation time. The NULL-pointer dereference is only germane
when using the ABE feature, which is disabled by default.

While at it:

- Defer the allocation of memory until it is actually needed given that ABE is
  optional and disabled by default.

- Document the ENOMEM errno in getsockopt(2)/setsockopt(2).

- Document ENOMEM and ENOBUFS in tcp(4) as being synonymous given that they are
  used interchangeably throughout the code.

- Fix a few other nits also accidentally omitted from the original patch.

Reported by:	Harsh Jain on freebsd-net@
Tested by:	tjh@
Differential Revision:	https://reviews.freebsd.org/D15358
2018-05-17 02:46:27 +00:00
..
cc_cdg.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
cc_chd.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
cc_cubic.c CC Cubic: fix underflow for cubic_cwnd() 2018-03-26 19:53:36 +00:00
cc_cubic.h cc_cubic: 2018-05-03 15:01:27 +00:00
cc_dctcp.c Revert r307901 - Inform CC modules about loss events. 2017-07-25 15:08:52 +00:00
cc_hd.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
cc_htcp.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
cc_module.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
cc_newreno.c Plug a memory leak and potential NULL-pointer dereference introduced in r331214. 2018-05-17 02:46:27 +00:00
cc_newreno.h Add support for the experimental Internet-Draft "TCP Alternative Backoff with 2018-03-19 16:37:47 +00:00
cc_vegas.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
cc.c Add support for the experimental Internet-Draft "TCP Alternative Backoff with 2018-03-19 16:37:47 +00:00
cc.h CC Cubic: fix underflow for cubic_cwnd() 2018-03-26 19:53:36 +00:00