summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorXiyu Yang <xiyuyang19@fudan.edu.cn>2020-04-25 16:06:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-05 11:06:50 +0300
commitf0b6ce595c397a91d5b62c6b0b5ea93b84191795 (patch)
tree498cc677ded20459318e79b1f4bebe0e81708b18 /scripts
parent880e98b1abec52b23e9481312596d54dfa614bcd (diff)
downloadlinux-f0b6ce595c397a91d5b62c6b0b5ea93b84191795.tar.xz
net/x25: Fix x25_neigh refcnt leak when x25 disconnect
commit 4becb7ee5b3d2829ed7b9261a245a77d5b7de902 upstream. x25_connect() invokes x25_get_neigh(), which returns a reference of the specified x25_neigh object to "x25->neighbour" with increased refcnt. When x25 connect success and returns, the reference still be hold by "x25->neighbour", so the refcount should be decreased in x25_disconnect() to keep refcount balanced. The reference counting issue happens in x25_disconnect(), which forgets to decrease the refcnt increased by x25_get_neigh() in x25_connect(), causing a refcnt leak. Fix this issue by calling x25_neigh_put() before x25_disconnect() returns. Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions