Slavin Liu
8a6ecab384
ipvs: Defer ip_vs_ftp unregister during netns cleanup
...
[ Upstream commit 134121bfd9 ]
On the netns cleanup path, __ip_vs_ftp_exit() may unregister ip_vs_ftp
before connections with valid cp->app pointers are flushed, leading to a
use-after-free.
Fix this by introducing a global `exiting_module` flag, set to true in
ip_vs_ftp_exit() before unregistering the pernet subsystem. In
__ip_vs_ftp_exit(), skip ip_vs_ftp unregister if called during netns
cleanup (when exiting_module is false) and defer it to
__ip_vs_cleanup_batch(), which unregisters all apps after all connections
are flushed. If called during module exit, unregister ip_vs_ftp
immediately.
Fixes: 61b1ab4583 ("IPVS: netns, add basic init per netns.")
Suggested-by: Julian Anastasov <ja@ssi.bg >
Signed-off-by: Slavin Liu <slavin452@gmail.com >
Signed-off-by: Julian Anastasov <ja@ssi.bg >
Signed-off-by: Florian Westphal <fw@strlen.de >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2025-10-29 13:59:49 +01:00
..
2025-10-29 13:59:48 +01:00
2025-10-29 13:59:49 +01:00
2023-06-21 15:44:10 +02:00
2022-09-05 10:27:47 +02:00
2019-09-13 11:39:38 +02:00
2025-04-10 14:29:35 +02:00
2019-06-19 17:09:55 +02:00
2019-07-16 13:16:59 +02:00
2019-07-16 13:16:59 +02:00
2023-06-14 10:59:55 +02:00
2019-09-13 12:33:06 +02:00
2019-09-13 12:33:06 +02:00
2019-05-30 11:26:32 -07:00
2023-06-09 10:29:01 +02:00
2024-03-15 10:48:15 -04:00
2019-07-16 13:16:59 +02:00
2019-06-19 17:09:52 +02:00
2025-09-09 18:43:57 +02:00
2022-09-28 11:04:05 +02:00
2019-08-27 18:07:03 +02:00
2019-05-30 11:26:32 -07:00
2025-08-28 16:21:24 +02:00
2020-06-03 08:21:39 +02:00
2023-07-27 08:37:12 +02:00
2019-06-19 17:09:55 +02:00
2021-04-10 13:34:31 +02:00
2019-07-16 13:17:00 +02:00
2023-01-18 11:41:08 +01:00
2024-03-01 13:13:34 +01:00
2023-02-06 07:52:43 +01:00
2021-11-17 09:48:33 +01:00
2021-06-10 13:37:02 +02:00
2019-07-16 13:16:59 +02:00
2019-05-31 18:02:45 +02:00
2023-07-27 08:37:12 +02:00
2019-05-30 11:26:32 -07:00
2025-06-04 14:32:31 +02:00
2019-07-16 13:16:59 +02:00
2019-09-13 12:33:06 +02:00
2019-05-24 17:37:51 +02:00
2020-10-29 09:57:57 +01:00
2021-02-17 10:35:17 +01:00
2019-05-21 10:50:45 +02:00
2020-04-01 11:02:09 +02:00
2019-04-12 01:47:39 +02:00
2020-10-29 09:57:45 +01:00
2019-06-19 17:09:55 +02:00
2024-02-23 08:25:04 +01:00
2019-07-16 13:16:59 +02:00
2021-01-19 18:26:19 +01:00
2019-07-16 13:16:59 +02:00
2019-06-22 08:59:24 -04:00
2019-07-16 13:16:59 +02:00
2021-10-17 10:42:34 +02:00
2021-03-17 17:03:32 +01:00
2023-11-20 10:30:16 +01:00
2019-07-16 13:16:59 +02:00
2019-07-16 13:16:59 +02:00
2022-03-08 19:07:47 +01:00
2017-11-02 11:10:55 +01:00
2021-06-23 14:41:25 +02:00
2025-08-28 16:21:19 +02:00
2022-03-28 08:46:47 +02:00
2023-07-27 08:37:27 +02:00
2019-04-30 13:35:26 +02:00
2023-07-27 08:37:27 +02:00
2025-01-09 13:23:35 +01:00
2023-07-27 08:37:27 +02:00
2023-07-27 08:37:27 +02:00
2023-11-08 11:23:41 +01:00
2023-09-23 10:59:59 +02:00
2024-06-16 13:28:46 +02:00
2023-06-21 15:44:11 +02:00
2023-05-30 12:44:07 +01:00
2024-02-23 08:25:15 +01:00
2023-11-28 16:50:23 +00:00
2020-03-18 07:17:58 +01:00
2020-11-18 19:20:17 +01:00
2023-05-30 12:44:07 +01:00
2024-03-06 14:36:09 +00:00
2019-10-01 18:42:15 +02:00
2024-09-04 13:14:59 +02:00
2024-03-15 10:48:14 -04:00
2023-05-30 12:44:07 +01:00
2023-08-30 16:27:17 +02:00
2025-04-10 14:29:35 +02:00
2019-06-19 17:09:55 +02:00
2019-09-03 22:53:56 +02:00
2023-05-30 12:44:07 +01:00
2024-02-23 08:24:51 +01:00
2023-05-30 12:44:07 +01:00
2023-05-30 12:44:07 +01:00
2023-05-30 12:44:07 +01:00
2021-04-21 12:56:17 +02:00
2019-06-19 17:09:55 +02:00
2024-07-05 09:08:27 +02:00
2023-05-30 12:44:07 +01:00
2024-02-23 08:25:15 +01:00
2024-02-23 08:24:51 +01:00
2023-05-30 12:44:07 +01:00
2023-08-16 18:19:24 +02:00
2023-05-30 12:44:07 +01:00
2024-11-08 16:20:53 +01:00
2023-05-30 12:44:07 +01:00
2019-09-03 19:05:00 +02:00
2023-05-30 12:44:07 +01:00
2023-11-20 10:30:16 +01:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2024-02-23 08:24:51 +01:00
2023-11-28 16:50:22 +00:00
2024-12-14 19:44:46 +01:00
2024-08-19 05:33:53 +02:00
2025-06-27 11:02:44 +01:00
2024-02-23 08:24:51 +01:00
2024-02-23 08:24:51 +01:00
2023-05-30 12:44:07 +01:00
2024-02-23 08:24:51 +01:00
2020-11-18 19:20:17 +01:00
2021-04-16 11:46:38 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-21 10:50:45 +02:00
2018-02-14 21:05:38 +01:00
2019-06-19 17:09:55 +02:00
2019-09-13 12:33:06 +02:00
2019-05-21 11:28:45 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-22 08:59:24 -04:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2025-01-09 13:23:35 +01:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-22 08:59:24 -04:00
2019-06-19 17:09:55 +02:00
2019-08-13 12:08:48 +02:00
2019-05-30 11:26:32 -07:00
2019-06-25 01:32:59 +02:00
2019-05-21 10:50:45 +02:00
2019-06-19 17:09:55 +02:00
2024-12-14 19:44:45 +01:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2025-08-28 16:21:20 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2023-06-28 10:18:40 +02:00
2023-12-13 18:18:12 +01:00
2019-09-13 12:32:48 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-21 10:50:45 +02:00
2019-06-19 17:09:55 +02:00
2021-01-12 20:16:24 +01:00
2019-06-19 17:09:55 +02:00
2025-01-09 13:23:35 +01:00
2023-11-20 10:30:16 +01:00
2017-11-02 11:10:55 +01:00
2023-09-23 10:59:54 +02:00
2021-05-19 10:08:27 +02:00
2019-08-13 12:14:26 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-22 08:59:24 -04:00
2019-06-22 08:59:24 -04:00
2019-05-21 10:50:45 +02:00
2019-05-21 11:28:40 +02:00
2019-04-22 10:34:30 +02:00
2019-06-19 17:09:55 +02:00
2019-05-21 10:50:45 +02:00
2023-09-23 10:59:53 +02:00