]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: ulp: avoid module refcnt leak in tcp_set_ulp
authorSabrina Dubroca <sd@queasysnail.net>
Mon, 14 Aug 2017 16:04:24 +0000 (18:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Aug 2017 05:17:05 +0000 (22:17 -0700)
commit740856c4e35a299fefbf0f7e7948a2fa52f1ae8e
tree0ad4648c157cf03a6f00c4a55c159a1a766eb972
parent3a10b38175398cfebf447c15cb11dc02a97f9a94
tcp: ulp: avoid module refcnt leak in tcp_set_ulp

__tcp_ulp_find_autoload returns tcp_ulp_ops after taking a reference on
the module. Then, if ->init fails, tcp_set_ulp propagates the error but
nothing releases that reference.

Fixes: 83c82325ff1c ("tcp: ULP infrastructure")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ulp.c