Message ID | 20210408184053.23263-2-tim.gardner@canonical.com |
---|---|
State | New |
Headers | show |
Series | [Bionic] netfilter: x_tables: Use correct memory barriers. | expand |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 54f346a45cd0a..ae69b98b451b5 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h @@ -373,7 +373,7 @@ static inline unsigned int xt_write_recseq_begin(void) * since addend is most likely 1 */ __this_cpu_add(xt_recseq.sequence, addend); - smp_wmb(); + smp_mb(); return addend; } diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 399cde7de86a3..4638d42a22e40 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -1250,7 +1250,7 @@ xt_replace_table(struct xt_table *table, table->private = newinfo; /* make sure all cpus see new ->private value */ - smp_wmb(); + smp_mb(); /* * Even though table entries have now been swapped, other CPU's