mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-20 19:23:40 +00:00
netfilter: nft_quota: use atomic64_xchg for reset
Use atomic64_xchg() to atomically read and zero the consumed value on reset, which is simpler than the previous read+sub pattern and doesn't require lock serialization. Fixes:bd662c4218("netfilter: nf_tables: Add locking for NFT_MSG_GETOBJ_RESET requests") Fixes:3d483faa66("netfilter: nf_tables: Add locking for NFT_MSG_GETSETELEM_RESET requests") Fixes:3cb03edb4d("netfilter: nf_tables: Add locking for NFT_MSG_GETRULE_RESET requests") Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Brian Witte <brianwitte@mailfence.com> Signed-off-by: Florian Westphal <fw@strlen.de>
This commit is contained in:
parent
779c60a519
commit
30c4d7fb59
1 changed files with 7 additions and 6 deletions
Loading…
Add table
Add a link
Reference in a new issue