tcp: properly handle md5sig_pool references
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 29 Sep 2011 17:10:10 +0000 (17:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Oct 2011 03:31:24 +0000 (23:31 -0400)
commit260fcbeb1ae9e768a44c9925338fbacb0d7e5ba9
tree741dea73d68eca24c8d515bb7091cbedb77192a4
parentcb2d0f3e968bff7c6d262aca3e3ab8d4184e69b2
tcp: properly handle md5sig_pool references

tcp_v4_clear_md5_list() assumes that multiple tcp md5sig peers
only hold one reference to md5sig_pool. but tcp_v4_md5_do_add()
increases use count of md5sig_pool for each peer. This patch
makes tcp_v4_md5_do_add() only increases use count for the first
tcp md5sig peer.

Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c
net/ipv6/tcp_ipv6.c