Originally, some accesses to `conditions_list` were protected by RCU and the memory-barrier was needed to ensure that the new variable was fully initialized before being added to the list. These days, however, all accesses are protected by the `proc_lock` mutex, so the barrier is no longer required. Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx> --- extensions/xt_condition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/xt_condition.c b/extensions/xt_condition.c index e1672985e59b..d390faeac1b0 100644 --- a/extensions/xt_condition.c +++ b/extensions/xt_condition.c @@ -176,7 +176,7 @@ static int condition_mt_check(const struct xt_mtchk_param *par) make_kgid(&init_user_ns, condition_gid_perms)); var->refcount = 1; var->enabled = false; - wmb(); + list_add(&var->list, &condition_net->conditions_list); mutex_unlock(&condition_net->proc_lock); info->condvar = var; -- 2.32.0