Florian Westphal
516bd00e5a
netfilter: nft_compat: remove flush counter optimization
...
commit 2f941622fd88328ca75806c45c9e9709286a0609 upstream.
WARNING: CPU: 1 PID: 16059 at lib/refcount.c:31 refcount_warn_saturate+0xdf/0xf
[..]
__nft_mt_tg_destroy+0x42/0x50 [nft_compat]
nft_target_destroy+0x63/0x80 [nft_compat]
nf_tables_expr_destroy+0x1b/0x30 [nf_tables]
nf_tables_rule_destroy+0x3a/0x70 [nf_tables]
nf_tables_exit_net+0x186/0x3d0 [nf_tables]
Happens when a compat expr is destoyed from abort path.
There is no functional impact; after this work queue is flushed
unconditionally if its pending.
This removes the waitcount optimization. Test of repeated
iptables-restore of a ~60k kubernetes ruleset doesn't indicate
a slowdown. In case the counter is needed after all for some workloads
we can revert this and increment the refcount for the
!= NFT_PREPARE_TRANS case to avoid the increment/decrement imbalance.
While at it, also flush for match case, this was an oversight
in the original patch.
Fixes: ffe8923f109b7e ("netfilter: nft_compat: make sure xtables destructors have run")
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-19 18:26:19 +01:00
..
2021-01-19 18:26:14 +01:00
2020-11-18 19:20:17 +01:00
2019-07-04 02:29:49 +02:00
2019-09-26 08:56:17 +02:00
2019-09-13 11:39:38 +02:00
2019-05-21 10:50:45 +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
2020-07-16 08:16:38 +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
2019-09-02 11:20:17 -07:00
2019-07-16 13:17:00 +02:00
2019-07-16 13:16:59 +02:00
2019-06-19 17:09:52 +02:00
2019-09-13 12:33:06 +02:00
2019-07-16 13:16:59 +02:00
2019-08-27 18:07:03 +02:00
2019-05-30 11:26:32 -07:00
2020-10-07 08:01:31 +02:00
2020-06-03 08:21:39 +02:00
2020-01-14 20:08:39 +01:00
2019-06-19 17:09:55 +02:00
2019-07-16 13:17:00 +02:00
2019-07-16 13:17:00 +02:00
2019-09-13 12:33:06 +02:00
2020-09-17 13:47:45 +02:00
2020-10-29 09:57:57 +01:00
2019-06-19 17:09:55 +02:00
2020-10-01 13:18:17 +02:00
2019-07-16 13:16:59 +02:00
2019-05-31 18:02:45 +02:00
2019-07-16 13:16:59 +02:00
2019-05-30 11:26:32 -07:00
2021-01-19 18:26:19 +01: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
2019-10-23 13:14:50 +02: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
2019-07-04 02:29:48 +02: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
2019-04-11 20:59:34 +02:00
2020-11-18 19:20:17 +01:00
2019-06-22 08:59:24 -04:00
2019-07-16 13:16:59 +02:00
2019-07-16 13:16:59 +02:00
2020-01-09 10:20:03 +01:00
2017-11-02 11:10:55 +01:00
2020-11-18 19:20:17 +01:00
2020-12-30 11:50:54 +01:00
2019-07-05 21:34:47 +02:00
2020-12-11 13:23:33 +01:00
2019-04-30 13:35:26 +02:00
2019-06-19 17:09:55 +02:00
2019-05-24 17:37:51 +02:00
2020-06-03 08:21:35 +02:00
2019-05-24 17:37:51 +02:00
2020-09-09 19:12:27 +02:00
2020-05-14 07:58:29 +02:00
2020-09-09 19:12:27 +02:00
2020-11-18 19:20:17 +01:00
2020-01-12 12:21:18 +01:00
2019-08-26 11:01:00 +02:00
2019-07-19 18:08:14 +02:00
2020-03-18 07:17:58 +01:00
2020-11-18 19:20:17 +01:00
2020-01-12 12:21:18 +01:00
2021-01-19 18:26:19 +01:00
2019-10-01 18:42:15 +02:00
2019-06-19 17:09:55 +02:00
2020-12-30 11:50:55 +01:00
2019-09-10 22:44:29 +02:00
2021-01-12 20:16:24 +01:00
2020-08-26 10:40:59 +02:00
2019-06-19 17:09:55 +02:00
2019-09-03 22:53:56 +02:00
2019-06-19 17:09:55 +02:00
2020-01-17 19:48:19 +01:00
2020-10-29 09:57:57 +01:00
2019-07-16 13:17:03 +02:00
2019-08-13 12:10:01 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-09-20 10:20:02 +02:00
2019-06-21 22:23:35 -07:00
2020-01-17 19:48:33 +01:00
2020-06-22 09:31:00 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:15 +02:00
2020-01-29 16:45:29 +01:00
2020-12-11 13:23:33 +01:00
2019-06-19 17:09:55 +02:00
2019-09-03 19:05:00 +02:00
2020-01-12 12:21:18 +01:00
2019-07-16 13:17:00 +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-08-13 12:15:44 +02:00
2019-08-27 17:27:08 +02:00
2020-05-20 08:20:25 +02:00
2019-09-02 23:20:59 +02:00
2019-09-10 22:35:37 +02:00
2020-01-09 10:19:54 +01:00
2020-03-18 07:17:57 +01:00
2019-06-19 17:09:55 +02:00
2020-11-18 19:20:17 +01:00
2020-12-30 11:50:54 +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-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
2020-03-21 08:11:46 +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
2019-05-30 11:26:38 -07: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
2019-08-19 09:34:21 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-21 11:28:45 +02:00
2019-06-25 01:32:59 +02: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
2020-03-18 07:17:49 +01:00
2019-06-19 17:09:55 +02:00
2017-11-02 11:10:55 +01:00
2019-05-21 10:50:45 +02:00
2019-06-19 17:09:55 +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
2019-05-21 10:50:45 +02:00