Florian Westphal
e2642d1e42
netfilter: nf_tables: allow clone callbacks to sleep
...
commit fa23e0d4b7 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 >
2024-08-14 13:53:03 +02:00
..
2022-10-05 07:05:41 +09:00
2024-07-25 09:49:20 +02:00
2024-08-14 13:53:03 +02:00
2023-10-25 12:03:06 +02:00
2022-07-22 12:53:22 +01:00
2023-03-11 13:55:26 +01:00
2023-03-11 13:55:28 +01:00
2022-09-09 08:24:41 +01:00
2024-04-17 11:18:24 +02:00
2022-09-01 11:44:13 +01:00
2024-05-02 16:29:27 +02:00
2022-08-23 10:43:11 +02:00
2022-07-22 12:53:22 +01:00
2023-10-10 22:00:42 +02:00
2024-06-12 11:03:20 +02:00
2022-08-09 22:14:02 -07:00
2022-09-16 14:34:01 +01:00
2023-05-11 23:03:41 +09:00
2022-07-22 12:53:22 +01:00
2023-08-30 16:11:04 +02:00
2022-08-24 13:46:58 +01:00
2023-11-20 11:52:18 +01:00
2024-04-03 15:19:31 +02:00
2022-07-22 12:53:22 +01:00
2022-07-24 18:39:17 -06:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2022-09-30 18:17:16 -07:00
2022-09-07 15:28:08 +01:00
2024-04-27 17:07:17 +02:00
2022-10-03 07:52:13 +01:00
2024-06-16 13:41:40 +02:00
2022-12-31 13:33:02 +01:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2022-07-28 22:21:54 -07:00
2022-09-20 09:13:38 +02:00
2022-09-20 09:13:38 +02:00
2023-11-20 11:52:15 +01:00
2022-07-11 19:49:38 -07:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2023-12-13 18:39:12 +01:00
2022-08-25 16:07:42 -07:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2022-10-07 08:42:00 +01:00
2023-12-20 17:00:15 +01:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2024-06-12 11:03:12 +02:00
2024-06-12 11:03:53 +02:00
2024-07-05 09:31:46 +02:00
2022-07-22 12:53:22 +01:00
2024-06-12 11:03:12 +02:00
2024-01-31 16:17:04 -08:00
2023-01-12 12:02:15 +01:00
2023-09-19 12:28:10 +02:00
2024-08-14 13:53:02 +02:00
2024-08-03 08:49:24 +02:00
2024-06-21 14:35:51 +02:00
2023-05-24 17:32:39 +01:00
2024-02-05 20:13:00 +00:00
2022-09-29 07:18:00 +02:00
2022-07-22 12:53:22 +01:00
2024-03-06 14:45:20 +00:00
2023-09-19 12:28:10 +02:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2024-01-31 16:17:04 -08:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2022-07-28 11:29:36 +02:00
2023-09-13 09:42:33 +02:00
2024-06-12 11:02:58 +02:00
2024-05-02 16:29:32 +02:00
2024-03-06 14:45:06 +00:00
2022-07-22 12:53:22 +01:00
2023-01-07 11:11:44 +01:00
2022-12-31 13:33:02 +01:00
2022-07-22 12:53:22 +01:00
2023-10-10 22:00:42 +02:00
2023-10-10 22:00:42 +02:00
2022-07-11 16:25:14 +02:00
2022-07-22 12:53:22 +01:00
2023-10-10 22:00:44 +02:00
2022-07-22 12:53:22 +01:00
2023-10-10 22:00:46 +02:00
2022-09-02 19:59:08 -07:00
2022-07-22 12:53:22 +01:00
2023-06-05 09:26:20 +02:00
2023-06-14 11:15:16 +02:00
2022-10-02 16:07:17 +01:00
2023-07-23 13:49:27 +02:00
2022-07-22 12:53:22 +01:00
2022-07-15 18:50:35 -07:00
2022-07-22 12:53:22 +01:00
2023-04-13 16:55:23 +02:00
2022-10-11 17:42:58 -06:00
2023-07-19 16:21:10 +02:00
2022-08-01 11:59:23 -07:00
2023-08-11 12:08:14 +02:00
2023-06-14 11:15:20 +02:00
2023-08-30 16:11:02 +02:00
2024-06-27 13:46:15 +02:00
2023-05-11 23:03:18 +09:00
2022-07-22 12:53:22 +01:00
2022-07-27 13:24:42 +01:00
2022-12-31 13:32:04 +01:00
2024-06-16 13:41:40 +02:00
2022-07-22 12:53:22 +01:00
2022-07-18 11:24:10 +01:00
2024-03-01 13:26:35 +01:00
2024-08-03 08:49:04 +02:00
2024-02-23 09:12:31 +01:00
2022-07-22 12:53:22 +01:00
2022-07-22 12:53:22 +01:00
2024-01-10 17:10:28 +01:00
2024-01-10 17:10:27 +01:00
2022-10-12 17:50:37 -07:00
2023-08-11 12:08:17 +02:00
2022-07-22 12:53:22 +01:00
2022-09-30 07:55:46 -07:00
2022-09-26 13:28:19 -07:00
2024-05-17 11:56:10 +02:00
2023-05-11 23:03:21 +09:00