Florian Westphal
a561c6a034
netfilter: nf_tables: allow clone callbacks to sleep
...
commit fa23e0d4b756d25829e124d6b670a4c6bbd4bf7e upstream.
Sven Auhagen reports transaction failures with following error:
./main.nft:13:1-26: Error: Could not process rule: Cannot allocate memory
percpu: allocation failed, size=16 align=8 atomic=1, atomic alloc failed, no space left
This points to failing pcpu allocation with GFP_ATOMIC flag.
However, transactions happen from user context and are allowed to sleep.
One case where we can call into percpu allocator with GFP_ATOMIC is
nft_counter expression.
Normally this happens from control plane, so this could use GFP_KERNEL
instead. But one use case, element insertion from packet path,
needs to use GFP_ATOMIC allocations (nft_dynset expression).
At this time, .clone callbacks always use GFP_ATOMIC for this reason.
Add gfp_t argument to the .clone function and pass GFP_KERNEL or
GFP_ATOMIC flag depending on context, this allows all clone memory
allocations to sleep for the normal (transaction) case.
Cc: Sven Auhagen <sven.auhagen@voleatech.de >
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 >
2025-03-22 12:50:50 -07:00
..
2024-12-27 13:58:49 +01:00
2025-03-22 12:50:39 -07:00
2024-06-27 13:49:08 +02:00
2023-04-21 11:34:14 -07:00
2023-04-21 11:34:14 -07:00
2024-11-01 01:58:28 +01:00
2025-03-22 12:50:39 -07:00
2023-09-15 10:17:55 -07:00
2022-07-11 16:25:15 +02:00
2025-01-17 13:36:15 +01:00
2023-02-22 00:28:47 +01:00
2023-07-20 10:06:36 +02:00
2023-09-13 21:57:50 +02:00
2022-09-20 23:50:03 +02:00
2024-03-15 10:48:19 -04:00
2022-08-11 16:50:49 +02:00
2023-07-05 14:42:15 +02:00
2022-09-07 15:55:23 +02:00
2024-10-04 16:29:42 +02:00
2023-03-08 14:25:41 +01:00
2022-07-11 16:25:15 +02:00
2023-07-27 13:45:51 +02:00
2023-07-05 14:42:15 +02:00
2022-11-30 23:01:20 +01:00
2024-03-01 13:34:51 +01:00
2024-02-05 20:14:36 +00:00
2023-02-01 12:18:51 +01:00
2023-01-18 13:05:24 +01:00
2022-08-11 16:50:25 +02:00
2023-06-26 17:18:48 +02:00
2024-06-27 13:49:08 +02:00
2022-07-11 16:25:15 +02:00
2024-12-14 19:59:35 +01:00
2024-08-29 17:33:49 +02:00
2024-12-14 19:59:35 +01:00
2024-08-29 17:33:19 +02:00
2022-07-11 16:25:14 +02:00
2024-07-05 09:33:47 +02:00
2024-06-27 13:49:08 +02:00
2024-01-25 15:35:59 -08:00
2024-02-05 20:14:36 +00:00
2022-09-07 16:46:04 +02:00
2023-02-02 00:25:14 +01:00
2024-10-17 15:24:20 +02:00
2022-09-07 16:46:04 +02:00
2022-11-18 02:15:15 +01:00
2022-09-07 16:46:04 +02:00
2024-01-10 17:16:50 +01:00
2023-11-20 11:59:37 +01:00
2022-09-07 16:46:04 +02:00
2024-01-25 15:35:59 -08:00
2022-07-15 11:49:55 +01:00
2025-03-22 12:50:50 -07:00
2024-01-10 17:16:47 +01:00
2023-07-31 09:11:24 +01:00
2023-04-22 01:39:41 +02:00
2022-07-11 16:25:15 +02:00
2023-04-21 11:34:14 -07:00
2024-01-25 15:35:59 -08:00
2023-09-06 18:07:49 +02:00
2024-08-29 17:33:19 +02:00
2023-06-08 04:00:02 +02:00
2023-06-26 12:59:18 -07:00
2023-11-28 17:19:52 +00:00
2024-05-02 16:32:39 +02:00
2023-07-31 09:11:24 +01:00
2024-03-06 14:48:36 +00:00
2025-03-22 12:50:50 -07:00
2025-03-22 12:50:50 -07:00
2023-05-03 13:49:08 +02:00
2025-03-22 12:50:37 -07:00
2022-11-15 10:46:34 +01:00
2025-03-22 12:50:50 -07:00
2025-03-22 12:50:39 -07:00
2024-06-12 11:12:58 +02:00
2025-02-08 09:52:03 +01:00
2023-06-26 08:05:57 +02:00
2023-06-26 08:05:57 +02:00
2024-11-14 13:19:32 +01:00
2024-12-14 19:59:38 +01:00
2025-03-22 12:50:50 -07:00
2025-03-22 12:50:50 -07:00
2022-11-15 10:46:34 +01:00
2024-09-30 16:25:13 +02:00
2023-07-27 13:45:51 +02:00
2024-06-21 14:38:34 +02:00
2024-01-31 16:19:03 -08:00
2022-11-15 10:46:34 +01:00
2023-07-05 14:42:15 +02:00
2023-08-22 15:13:21 +02:00
2024-11-08 16:28:19 +01:00
2022-11-15 10:46:34 +01:00
2025-03-22 12:50:50 -07:00
2023-06-26 08:05:57 +02:00
2023-07-27 13:45:51 +02:00
2023-06-26 08:05:57 +02:00
2024-12-14 19:59:35 +01:00
2024-10-10 11:58:07 +02:00
2025-03-22 12:50:50 -07:00
2024-08-03 08:54:37 +02:00
2025-03-22 12:50:50 -07:00
2024-08-03 08:54:04 +02:00
2025-03-22 12:50:50 -07:00
2024-12-14 19:59:34 +01:00
2024-01-31 16:19:03 -08:00
2024-01-31 16:19:03 -08:00
2024-02-05 20:14:36 +00:00
2024-01-31 16:19:03 -08:00
2023-03-08 14:25:40 +01:00
2024-11-08 16:28:19 +01:00
2024-10-17 15:24:28 +02:00
2024-10-17 15:24:28 +02:00
2024-10-17 15:24:28 +02:00
2024-10-17 15:24:28 +02:00
2024-10-17 15:24:28 +02:00
2024-10-17 15:24:28 +02:00
2024-10-17 15:24:28 +02:00
2024-10-17 15:24:28 +02:00
2024-10-17 15:24:28 +02:00
2022-07-11 16:40:45 +02:00
2024-12-19 18:11:32 +01:00
2024-12-14 19:59:33 +01:00
2023-02-22 21:25:23 -08:00
2024-11-01 01:58:29 +01:00
2024-11-01 01:58:29 +01:00
2023-06-20 22:43:42 +02:00
2023-12-13 18:45:10 +01:00
2024-01-25 15:35:59 -08:00
2024-10-17 15:24:28 +02:00
2023-11-20 11:59:36 +01:00
2023-03-22 21:48:59 +01:00
2023-08-22 15:13:21 +02:00
2023-08-30 17:34:01 +02:00
2024-10-17 15:24:28 +02:00
2023-07-29 18:13:41 +01:00
2022-10-11 17:42:58 -06:00
2022-07-11 16:40:45 +02:00
2023-03-22 21:48:59 +01:00
2022-07-21 00:56:00 +02:00
2024-11-01 01:58:29 +01:00
2023-08-30 17:34:01 +02:00