X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=net%2Fnetfilter%2Fx_tables.c;h=227aa11e8409bb18be93c0c432a4d71cfb6e8f38;hb=d09f4bdc4b8feadbb3326d4e6e0890556b19bf07;hp=8b03028cca69b616df298e0ffbfdeb247441a341;hpb=2a66a854f5d716bb67e24dba78e53bdd5f0253ad;p=karo-tx-linux.git diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 8b03028cca69..227aa11e8409 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -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