diff options
author | Florian Westphal <fw@strlen.de> | 2024-04-25 14:06:43 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-05-06 16:29:22 +0200 |
commit | 6c108d9bee448a850b03e682836bfe91fca645cb (patch) | |
tree | a01a2d1f745326f72420c0bf559fd780a1718239 /lib/test_fortify/write_overflow-memcpy.c | |
parent | 8b8a2417558c632f249abebde97adf8c46540de2 (diff) |
netfilter: nft_set_pipapo: prepare walk function for on-demand clone
The existing code uses iter->type to figure out what data is needed, the
live copy (READ) or clone (UPDATE).
Without pending updates, priv->clone and priv->match will point to
different memory locations, but they have identical content.
Future patch will make priv->clone == NULL if there are no pending changes,
in this case we must copy the live data for the UPDATE case.
Currently this would require GFP_ATOMIC allocation. Split the walk
function in two parts: one that does the walk and one that decides which
data is needed.
In the UPDATE case, callers hold the transaction mutex so we do not need
the rcu read lock. This allows to use GFP_KERNEL allocation while
cloning.
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'lib/test_fortify/write_overflow-memcpy.c')
0 files changed, 0 insertions, 0 deletions