Re: [ovs-dev] [branch 2.1] ipfix, sflow: Fix a race.

2015-07-16 Thread Alex Wang
On Thu, Jul 16, 2015 at 4:03 PM, Jarno Rajahalme wrote: > Alex, > > Not a review, but a comment: Isn’t it unnecessary to use atomics when the > refcount is protected with a mutex? > That's very true, now atomics is unnecessary. > Also, in general, a thread should not release the last referen

Re: [ovs-dev] [branch 2.1] ipfix, sflow: Fix a race.

2015-07-16 Thread Jarno Rajahalme
Alex, Not a review, but a comment: Isn’t it unnecessary to use atomics when the refcount is protected with a mutex? Also, in general, a thread should not release the last reference if other threads can still find the object. Why does this happen here? Jarno > On Jul 16, 2015, at 3:48 PM, Al