Pablo Neira Ayuso
3b2ddeb89f
netfilter: nft_dynset: restore set element counter when failing to update
...
commit 05907f10e235680cc7fb196810e4ad3215d5e648 upstream.
This patch fixes a race condition.
nft_rhash_update() might fail for two reasons:
- Element already exists in the hashtable.
- Another packet won race to insert an entry in the hashtable.
In both cases, new() has already bumped the counter via atomic_add_unless(),
therefore, decrement the set element counter.
Fixes: 22fe54d5fefc ("netfilter: nf_tables: add support for dynamic set updates")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-07 17:36:50 +02:00
..
2021-10-06 15:42:39 +02:00
2022-05-09 09:03:24 +02:00
2022-03-08 19:07:46 +01:00
2021-10-27 09:54:28 +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
2022-02-01 17:24:38 +01: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
2021-07-25 14:35:14 +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
2021-04-10 13:34:31 +02:00
2019-07-16 13:17:00 +02:00
2019-09-13 12:33:06 +02:00
2022-02-23 12:00:00 +01:00
2022-04-15 14:18:20 +02: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
2019-07-16 13:16:59 +02:00
2019-05-30 11:26:32 -07:00
2021-05-19 10:08:33 +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
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
2021-10-17 10:42:34 +02:00
2021-03-17 17:03:32 +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
2022-03-08 19:07:47 +01:00
2017-11-02 11:10:55 +01:00
2021-06-23 14:41:25 +02:00
2022-06-14 18:11:57 +02:00
2022-03-28 08:46:47 +02:00
2022-03-02 11:41:03 +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
2021-06-10 13:37:05 +02:00
2019-05-24 17:37:51 +02:00
2021-12-29 12:23:34 +01:00
2021-05-19 10:08:28 +02:00
2022-03-08 19:07:47 +01: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
2021-06-10 13:37:05 +02:00
2022-03-02 11:41:03 +01:00
2022-06-14 18:11:45 +02:00
2021-08-26 08:36:22 -04: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
2022-03-02 11:41:03 +01:00
2019-07-16 13:17:03 +02:00
2022-03-02 11:41:03 +01:00
2021-04-21 12:56:17 +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
2022-06-14 18:11:57 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:15 +02:00
2021-07-14 16:53:30 +02:00
2022-02-01 17:24:34 +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
2022-07-07 17:36:50 +02:00
2020-05-20 08:20:25 +02:00
2022-05-09 09:03:27 +02:00
2022-02-23 11:59:57 +01:00
2021-07-14 16:53:30 +02: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
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
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
2021-02-17 10:35:17 +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
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
2019-05-21 10:50:45 +02:00