]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipvs: add missing ip_vs_pe_put in sync code
authorJulian Anastasov <ja@ssi.bg>
Tue, 10 Mar 2015 13:27:11 +0000 (14:27 +0100)
committerJiri Slaby <jslaby@suse.cz>
Tue, 10 Mar 2015 16:21:38 +0000 (17:21 +0100)
commit43ef6dfb1464ed5d2a8e2473b6ad405feb10e2ca
treed31c56ca44dbb2cae8bfff7494e2209a058d53ff
parent4f877b0c89a891eaea726b7972217c8252b250c7
ipvs: add missing ip_vs_pe_put in sync code

[ upstream commit 528c943f3bb919aef75ab2fff4f00176f09a4019 ]

ip_vs_conn_fill_param_sync() gets in param.pe a module
reference for persistence engine from __ip_vs_pe_getbyname()
but forgets to put it. Problem occurs in backup for
sync protocol v1 (2.6.39).

Also, pe_data usually comes in sync messages for
connection templates and ip_vs_conn_new() copies
the pointer only in this case. Make sure pe_data
is not leaked if it comes unexpectedly for normal
connections. Leak can happen only if bogus messages
are sent to backup server.

Fixes: fe5e7a1efb66 ("IPVS: Backup, Adding Version 1 receive capability")
Cc: <stable@vger.kernel.org> # 3.10.x
Cc: <stable@vger.kernel.org> # 3.12.x
Cc: <stable@vger.kernel.org> # 3.14.x
Cc: <stable@vger.kernel.org> # 3.18.x
Cc: <stable@vger.kernel.org> # 3.19.x
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/netfilter/ipvs/ip_vs_sync.c