summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2026-04-30 10:44:14 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2026-05-05 02:52:55 +0300
commitf2da9a96abb4b7a64626e931cedd85f05d5498ca (patch)
tree2bfbcdf6534a398724cd4e08a598bad0905b5933 /include/linux
parentafbd961305eb483515650ccfcb7743608e7add78 (diff)
downloadlinux-f2da9a96abb4b7a64626e931cedd85f05d5498ca.tar.xz
ipvs: fix races around the conn_lfactor and svc_lfactor sysctl vars
Sashiko warns that the new sysctls vars can be changed after the hash tables are destroyed and their respective resizing works canceled, leading to mod_delayed_work() being called for canceled works. Solve this in different ways. conn_tab can be present even without services and is destroyed only on netns exit, so use disable_delayed_work_sync() to disable the work instead of adding more synchronization mechanisms. As for the svc_table, it is destroyed when the services are deleted, so we must be sure that netns exit is not called yet (the check for 'enable') and the work is not canceled by checking all under same mutex lock. Also, use WRITE_ONCE when updating the sysctl vars as we already read them with READ_ONCE. Link: https://sashiko.dev/#/patchset/20260410112352.23599-1-fw%40strlen.de Fixes: 8d7de5477e47 ("ipvs: add conn_lfactor and svc_lfactor sysctl vars") Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions