Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce70d0b3 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "netfilter: x_tables: fix ordering of jumpstack allocation and table update"

parents a8da9981 f053a05d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -271,6 +271,11 @@ unsigned int arpt_do_table(struct sk_buff *skb,
	local_bh_disable();
	addend = xt_write_recseq_begin();
	private = table->private;
	/*
	 * Ensure we load private-> members after we've fetched the base
	 * pointer.
	 */
	smp_read_barrier_depends();
	table_base = private->entries[smp_processor_id()];

	e = get_entry(table_base, private->hook_entry[hook]);
+5 −0
Original line number Diff line number Diff line
@@ -327,6 +327,11 @@ ipt_do_table(struct sk_buff *skb,
	addend = xt_write_recseq_begin();
	private = table->private;
	cpu        = smp_processor_id();
	/*
	 * Ensure we load private-> members after we've fetched the base
	 * pointer.
	 */
	smp_read_barrier_depends();
	table_base = private->entries[cpu];
	jumpstack  = (struct ipt_entry **)private->jumpstack[cpu];
	stackptr   = per_cpu_ptr(private->stackptr, cpu);
+5 −0
Original line number Diff line number Diff line
@@ -349,6 +349,11 @@ ip6t_do_table(struct sk_buff *skb,
	local_bh_disable();
	addend = xt_write_recseq_begin();
	private = table->private;
	/*
	 * Ensure we load private-> members after we've fetched the base
	 * pointer.
	 */
	smp_read_barrier_depends();
	cpu        = smp_processor_id();
	table_base = private->entries[cpu];
	jumpstack  = (struct ip6t_entry **)private->jumpstack[cpu];
+6 −1
Original line number Diff line number Diff line
@@ -845,8 +845,13 @@ xt_replace_table(struct xt_table *table,
		return NULL;
	}

	table->private = newinfo;
	newinfo->initial_entries = private->initial_entries;
	/*
	 * Ensure contents of newinfo are visible before assigning to
	 * private.
	 */
	smp_wmb();
	table->private = newinfo;

	/*
	 * Even though table entries have now been swapped, other CPU's