You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
netfilter: nf_tables: report use refcount overflow
JIRA: https://issues.redhat.com/browse/RHEL-1720
JIRA: https://issues.redhat.com/browse/RHEL-1721
Upstream Status: commit 1689f25
Conflicts: net/netfilter/nf_tables_api.c
Upstream switched tp KERNEL_ACCOUNT in
33758c8 ("memcg: enable accounting for nft objects").
Also, we lack
b9703ed ("netfilter: nf_tables: support for adding new devices to an existing netdev chain")
so we can drop the if/else part.
commit 1689f25
Author: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Wed Jun 28 16:24:27 2023 +0200
netfilter: nf_tables: report use refcount overflow
Overflow use refcount checks are not complete.
Add helper function to deal with object reference counter tracking.
Report -EMFILE in case UINT_MAX is reached.
nft_use_dec() splats in case that reference counter underflows,
which should not ever happen.
Add nft_use_inc_restore() and nft_use_dec_restore() which are used
to restore reference counter from error and abort paths.
Use u32 in nft_flowtable and nft_object since helper functions cannot
work on bitfields.
Remove the few early incomplete checks now that the helper functions
are in place and used to check for refcount overflow.
Fixes: 9651851 ("netfilter: add nftables")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fwestpha@redhat.com>
0 commit comments