mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
netfilter: nf_flow_table: fix netdev refcnt leak
[ Upstream commit26a302afbe] flow_offload_alloc() calls nf_route() to get a dst_entry. Internally, nf_route() calls ip_route_output_key() that allocates a dst_entry and holds it. So, a dst_entry should be released by dst_release() if nf_route() is successful. Otherwise, netns exit routine cannot be finished and the following message is printed: [ 257.490952] unregister_netdevice: waiting for lo to become free. Usage count = 1 Fixes:ac2a66665e("netfilter: add generic flow table infrastructure") Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
650a4b7c5d
commit
028b3d8d54
@@ -113,6 +113,7 @@ static void nft_flow_offload_eval(const struct nft_expr *expr,
|
||||
if (ret < 0)
|
||||
goto err_flow_add;
|
||||
|
||||
dst_release(route.tuple[!dir].dst);
|
||||
return;
|
||||
|
||||
err_flow_add:
|
||||
|
||||
Reference in New Issue
Block a user