kernel_samsung_a53x/include
Pablo Neira Ayuso b2a587e7a5 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>
2024-11-23 23:20:31 +01:00
..
acpi
asm-generic locking/rwlocks: Add contention detection for rwlocks 2024-11-19 17:44:08 +01:00
clocksource
crypto
drm
dt-bindings
keys
kunit
kvm
linux Fix gcc 4.9 build issue in 5.10.y 2024-11-23 23:20:30 +01:00
math-emu
media
memory
misc
net netfilter: nf_tables: allow clone callbacks to sleep 2024-11-23 23:20:31 +01:00
pcmcia
ras
rdma
scsc
scsi scsi: core: Fix a use-after-free 2024-11-19 14:19:51 +01:00
sdp
soc exynos-pm: fix build without CONFIG_SEC_PM_DEBUG 2024-11-19 17:39:21 +01:00
sound ALSA: dmaengine: Synchronize dma channel after drop() 2024-11-19 14:19:48 +01:00
target
test
trace SUNRPC: Fixup gss_status tracepoint error output 2024-11-23 23:20:10 +01:00
uapi m68k: amiga: Turn off Warp1260 interrupts during boot 2024-11-23 23:20:13 +01:00
variant1/linux
vdso
video
xen