]> git.ipfire.org Git - thirdparty/linux.git/commit
ipvs: some service readers can use RCU
authorJulian Anastasov <ja@ssi.bg>
Tue, 24 Feb 2026 20:50:41 +0000 (21:50 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 26 Feb 2026 03:36:25 +0000 (19:36 -0800)
commit3de0ec2873eac27ba033e867f5da23e081929c8f
tree6e5db51b07827f1f8628d39ff673223b10741cf6
parent74455a5b4326add2499cb4a1f9706154b3a1eab4
ipvs: some service readers can use RCU

Some places walk the services under mutex but they can just use RCU:

* ip_vs_dst_event() uses ip_vs_forget_dev() which uses its own lock
  to modify dest
* ip_vs_genl_dump_services(): ip_vs_genl_fill_service() just fills skb
* ip_vs_genl_parse_service(): move RCU lock to callers
  ip_vs_genl_set_cmd(), ip_vs_genl_dump_dests() and ip_vs_genl_get_cmd()
* ip_vs_genl_dump_dests(): just fill skb

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Reviewed-by: Dust Li <dust.li@linux.alibaba.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Link: https://patch.msgid.link/20260224205048.4718-3-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/netfilter/ipvs/ip_vs_ctl.c