- TEE: do not retain iif and mark on cloned packet
- TEE: new loop detection logic
- TEE: use less expensive pskb_copy
+- condition: remove unnecessary RCU protection
Xtables-addons 1.24 (March 17 2010)
{
const struct xt_condition_mtinfo *info = par->matchinfo;
const struct condition_variable *var = info->condvar;
- bool x;
- rcu_read_lock();
- x = rcu_dereference(var->enabled);
- rcu_read_unlock();
-
- return x ^ info->invert;
+ return var->enabled ^ info->invert;
}
static int condition_mt_check(const struct xt_mtchk_param *par)
wmb();
var->status_proc->read_proc = condition_proc_read;
var->status_proc->write_proc = condition_proc_write;
- list_add_rcu(&var->list, &conditions_list);
+ list_add(&var->list, &conditions_list);
var->status_proc->uid = condition_uid_perms;
var->status_proc->gid = condition_gid_perms;
mutex_unlock(&proc_lock);
mutex_lock(&proc_lock);
if (--var->refcount == 0) {
- list_del_rcu(&var->list);
+ list_del(&var->list);
remove_proc_entry(var->status_proc->name, proc_net_condition);
mutex_unlock(&proc_lock);
- /*
- * synchronize_rcu() would be good enough, but
- * synchronize_net() guarantees that no packet
- * will go out with the old rule after
- * succesful removal.
- */
- synchronize_net();
kfree(var);
return;
}