]> git.ipfire.org Git - thirdparty/ipset.git/commitdiff
netfilter: ipset: Correct the reported memory size
authorJozsef Kadlecsik <kadlec@netfilter.org>
Fri, 21 Feb 2020 20:53:11 +0000 (21:53 +0100)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Fri, 21 Feb 2020 20:53:11 +0000 (21:53 +0100)
The patch

netfilter: ipset: Fix "INFO: rcu detected stall in hash_xxx" reports

did not include the size of the comment extensions from the memory size
for set listing. Add it, so the proper size is printed.

Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
kernel/net/netfilter/ipset/ip_set_hash_gen.h

index 9ba0b993e349ebc67b9549007c9ac1340f85a8cf..e5f99ec910e3730a357507aae0b700192e415a86 100644 (file)
@@ -1284,7 +1284,7 @@ mtype_head(struct ip_set *set, struct sk_buff *skb)
        rcu_read_lock_bh();
        t = rcu_dereference_bh(h->table);
        mtype_ext_size(set, &elements, &ext_size);
-       memsize = mtype_ahash_memsize(h, t) + ext_size;
+       memsize = mtype_ahash_memsize(h, t) + ext_size + set->ext_size;
        htable_bits = t->htable_bits;
        rcu_read_unlock_bh();