Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7308cdf1 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Vegard Nossum
Browse files

netfilter: nft_counter: Synchronize nft_counter_reset() against reader.



[ Upstream commit a0b39e2dc7017ac667b70bdeee5293e410fab2fb ]

nft_counter_reset() resets the counter by subtracting the previously
retrieved value from the counter. This is a write operation on the
counter and as such it requires to be performed with a write sequence of
nft_counter_seq to serialize against its possible reader.

Update the packets/ bytes within write-sequence of nft_counter_seq.

Fixes: d84701ec ("netfilter: nft_counter: rework atomic dump and reset")
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
(cherry picked from commit 31c28919a99f5c491e3cce4fa7293b12e330e247)
Signed-off-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
parent 6bff278c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment