Skip to contentSkip to conversation

netfilter: nft_quota: don't read quota twice on reset

PATCH New Pablo Neira Ayuso 1 participant 1 message Dec 6, 2016

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: nft_quota: don't read quota twice on reset

The quota is already fetched before reset, so there is no need to re-fetch it, otherwise userspace reports consumed quota is always zero on reset. This problem was likely introduced when rebasing this patchset.

---
 net/netfilter/nft_quota.c | 1 -
 1 file changed, 1 deletion(-)
net/netfilter/nft_quota.c +0 -1
index 7e825e7f6210..2cfcdd1d4d45 100644
@@ -112,7 +112,6 @@ static int nft_quota_do_dump(struct sk_buff *skb, struct nft_quota *priv,
 		consumed = atomic64_read(&priv->consumed);
 	}
 
-	consumed = atomic64_read(&priv->consumed);
 	/* Since we inconditionally increment consumed quota for each packet
 	 * that we see, don't go over the quota boundary in what we send to
 	 * userspace.
Signature · 1 line
2.1.4