Message ID | 20210408173013.20311-6-tim.gardner@canonical.com |
---|---|
State | New |
Headers | show |
Series | 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 1b261c51b3a3..04e7f5630509 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h @@ -376,7 +376,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 cd2b034eef59..41409df0ca82 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -1387,7 +1387,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