Message ID | 4099DE2E54AFAD489356C6C9161D53339735B543@dggeml522-mbs.china.huawei.com |
---|---|
State | Superseded |
Headers | show |
Series | [ovs-dev,v3,1/5] ovs-rcu: fix rcu use-after-free issue | expand |
diff --git a/lib/ovs-rcu.h b/lib/ovs-rcu.h index ecc4c9201..98c238aea 100644 --- a/lib/ovs-rcu.h +++ b/lib/ovs-rcu.h @@ -118,10 +118,10 @@ * void * change_flow(struct flow *new_flow) * { + * struct flow *old_flow = ovsrcu_get_protected(struct flow *, &flowp) * ovs_mutex_lock(&mutex); - * ovsrcu_postpone(free, - * ovsrcu_get_protected(struct flow *, &flowp)); * ovsrcu_set(&flowp, new_flow); + * ovsrcu_postpone(free, old_flow); * ovs_mutex_unlock(&mutex); * } *