summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2015-03-19 13:24:47 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2015-03-19 13:24:47 +0100
commite2a781b4b8916ee5eff4c29ed5f08790b5ef28d1 (patch)
treeea17470fd41f2c58f69ea9d2a9641b43303b2614 /kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
parent1759d7ec38637e1eaf009619f463d6b121e23502 (diff)
Make sure bit operations are not reordered
Sergey Popovich pointed out that {set,clear}_bit() operations must be protected against instruction reordering.
Diffstat (limited to 'kernel/include/linux/netfilter/ipset/ip_set_compat.h.in')
-rw-r--r--kernel/include/linux/netfilter/ipset/ip_set_compat.h.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
index 66e830f..a0a7436 100644
--- a/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
+++ b/kernel/include/linux/netfilter/ipset/ip_set_compat.h.in
@@ -204,6 +204,11 @@ static inline int nla_put_net32(struct sk_buff *skb, int attrtype, __be32 value)
list_entry((pos)->member.prev, typeof(*(pos)), member)
#endif
+#ifndef smp_mb__before_atomic
+#define smp_mb__before_atomic() smp_mb()
+#define smp_mb__after_atomic() smp_mb()
+#endif
+
#ifndef __aligned_u64
#define __aligned_u64 __u64
#endif