]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gtp: use exit_batch_rtnl() method
authorEric Dumazet <edumazet@google.com>
Tue, 6 Feb 2024 14:43:03 +0000 (14:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2025 16:15:58 +0000 (17:15 +0100)
commita111a7487f65e4976774bf340b2e381e07eef3c3
treef199e0ddc6c0f250278ec43b39f099714c9430d3
parent041325b73abc9a4a6fcb1c1effe31918e87831f4
gtp: use exit_batch_rtnl() method

[ Upstream commit 6eedda01b2bfdcf427b37759e053dc27232f3af1 ]

exit_batch_rtnl() is called while RTNL is held,
and devices to be unregistered can be queued in the dev_kill_list.

This saves one rtnl_lock()/rtnl_unlock() pair per netns
and one unregister_netdevice_many() call per netns.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Antoine Tenart <atenart@kernel.org>
Link: https://lore.kernel.org/r/20240206144313.2050392-8-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 46841c7053e6 ("gtp: Use for_each_netdev_rcu() in gtp_genl_dump_pdp().")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/gtp.c