-----Original Message-----
From: Yanqin Wei [mailto:yanqin....@arm.com] 
Sent: Wednesday, June 3, 2020 7:23 AM
To: Ben Pfaff <b...@ovn.org>; Linhaifeng <haifeng....@huawei.com>
Cc: d...@openvswitch.org; nd <n...@arm.com>; Lilijun (Jerry) 
<jerry.lili...@huawei.com>; chenchanghu <chenchan...@huawei.com>; Lichunhe 
<lichu...@huawei.com>
Subject: RE: [ovs-dev] [PATCH v2] ovs rcu: update rcu pointer first

Hi Ben,

If my understanding is correct, the writer could not be a rcu thread because it 
does not need report holding or not holding pointers.
So old memory will be freed after all rcu thread report quiesce.

The write also is rcu thread. If not first update pointer the reader can also 
get the old pointer after call ovsrcu_quiesced.

Best Regards,
Wei Yanqin

> -----Original Message-----
> From: Ben Pfaff <b...@ovn.org>
> Sent: Wednesday, June 3, 2020 1:28 AM
> To: Linhaifeng <haifeng....@huawei.com>
> Cc: Yanqin Wei <yanqin....@arm.com>; d...@openvswitch.org; nd 
> <n...@arm.com>; Lilijun (Jerry) <jerry.lili...@huawei.com>; chenchanghu 
> <chenchan...@huawei.com>; Lichunhe <lichu...@huawei.com>
> Subject: Re: [ovs-dev] [PATCH v2] ovs rcu: update rcu pointer first
> 
> On Tue, Jun 02, 2020 at 07:27:59AM +0000, Linhaifeng wrote:
> > We should update rcu pointer first then use ovsrcu_postpone to free 
> > otherwise maybe cause use-after-free.
> > e.g.,reader indicates momentary quiescent and access old pointer 
> > after writer postpone free old pointer and before setting new pointer.
> >
> > Signed-off-by: Linhaifeng <haifeng....@huawei.com>
> 
> I don't see how that's possible, since the writer hasn't quiesced.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to