diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-03-25 11:10:29 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-03-25 11:10:29 +0100 |
commit | d90a2f5b8998f9063ff8aa7ae0fb301e3933f709 (patch) | |
tree | 5788a1833816977c3f6004136d591e6737c9102e /kernel/net/netfilter/ipset/ip_set_bitmap_ip.c | |
parent | 48509af4bc2a60c368c46f1351ddf5370e012bc0 (diff) |
References are protected by rwlock instead of mutex
The timeout variant of the list:set type must reference the member sets.
However, its garbage collector runs at timer interrupt so the mutex protection
of the references is a no go. Therefore the reference protection
is converted to rwlock.
Diffstat (limited to 'kernel/net/netfilter/ipset/ip_set_bitmap_ip.c')
-rw-r--r-- | kernel/net/netfilter/ipset/ip_set_bitmap_ip.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/net/netfilter/ipset/ip_set_bitmap_ip.c b/kernel/net/netfilter/ipset/ip_set_bitmap_ip.c index bca9699..a113ff0 100644 --- a/kernel/net/netfilter/ipset/ip_set_bitmap_ip.c +++ b/kernel/net/netfilter/ipset/ip_set_bitmap_ip.c @@ -338,8 +338,7 @@ bitmap_ip_head(struct ip_set *set, struct sk_buff *skb) NLA_PUT_IPADDR4(skb, IPSET_ATTR_IP_TO, htonl(map->last_ip)); if (map->netmask != 32) NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, map->netmask); - NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, - htonl(atomic_read(&set->ref) - 1)); + NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1)); NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, htonl(sizeof(*map) + map->memsize)); if (with_timeout(map->timeout)) |