]> git.dujemihanovic.xyz Git - linux.git/commit
net/smc: fix neighbour and rtable leak in smc_ib_find_route()
authorWen Gu <guwen@linux.alibaba.com>
Tue, 7 May 2024 12:53:31 +0000 (20:53 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 9 May 2024 08:03:43 +0000 (10:03 +0200)
commit2ddc0dd7fec86ee53b8928a5cca5fbddd4fc7c06
tree745697c986640d886499ac7311922e435b0bc3c6
parent4db783d68b9b39a411a96096c10828ff5dfada7a
net/smc: fix neighbour and rtable leak in smc_ib_find_route()

In smc_ib_find_route(), the neighbour found by neigh_lookup() and rtable
resolved by ip_route_output_flow() are not released or put before return.
It may cause the refcount leak, so fix it.

Link: https://lore.kernel.org/r/20240506015439.108739-1-guwen@linux.alibaba.com
Fixes: e5c4744cfb59 ("net/smc: add SMC-Rv2 connection establishment")
Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240507125331.2808-1-guwen@linux.alibaba.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/smc/smc_ib.c