aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-10-28 11:18:08 +0100
committerSteven Rostedt <rostedt@rostedt.homelinux.com>2013-08-16 22:00:16 -0400
commit32b26dc2b3f1a2cb4ba9e147f453edd0b5372fcb (patch)
tree900317691668a98299f60eb9fd208df524f346d4 /net
parentf6746ee2d2f086287b00cc775fdefec76bb3850b (diff)
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 afca6c78948c..aa3f87b8d43b 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -20,11 +20,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;