summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-10-28 10:18:08 (GMT)
committerScott Wood <scottwood@freescale.com>2014-05-14 18:38:50 (GMT)
commit8231158a432dab1bb241f54b35a862e284df7007 (patch)
tree9e67b2c0eccd1e49a85c67c0ee7d7f2c8a954106 /net
parent08e37b3bad7807a5419efd1caa2d44c3632f27c9 (diff)
downloadlinux-fsl-qoriq-8231158a432dab1bb241f54b35a862e284df7007.tar.xz
net: netfilter: Serialize xt_write_recseq sections on RT
The netfilter code relies only on the implicit semantics of local_bh_disable() for serializing wt_write_recseq sections. RT breaks that and needs explicit serialization here. Reported-by: Peter LaDow <petela@gocougs.wsu.edu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable-rt@vger.kernel.org
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 593b16e..6bd22aa 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -21,11 +21,17 @@
#include <linux/proc_fs.h>
#include <linux/mutex.h>
#include <linux/slab.h>
+#include <linux/locallock.h>
#include <net/net_namespace.h>
#include <net/sock.h>
#include "nf_internals.h"
+#ifdef CONFIG_PREEMPT_RT_BASE
+DEFINE_LOCAL_IRQ_LOCK(xt_write_lock);
+EXPORT_PER_CPU_SYMBOL(xt_write_lock);
+#endif
+
static DEFINE_MUTEX(afinfo_mutex);
const struct nf_afinfo __rcu *nf_afinfo[NFPROTO_NUMPROTO] __read_mostly;