On Tue, Feb 21, 2017 at 07:44:02PM -0800, Jarno Rajahalme wrote: > Handler threads use a selection of mirror functions with the > assumption that the data referred to is RCU protected, while the > implementation has not provided for this, which can lead to an OVS > crash. > > This patch fixes this by making the mbundle lookup RCU-safe by using > cmap instead of hmap and postponing mbundle memory free, as wells as > postponing the frees of the mirrors and the vlan bitmaps of each > mirror. > > Note that mirror stats update is still not accurate if multiple > threads do it simultaneously. > > A less complete version of this patch (using cmap and RCU postpone > just for the mbridge itself) was tested by Yunjian Wang and was found > to fix the observed crash when running a script that adds and deletes > a port repeatedly. > > Reported-by: Yunjian Wang <[email protected]> > Signed-off-by: Jarno Rajahalme <[email protected]>
The mirror code doesn't give me much confidence regarding concurrency, even after this patch, but it does seem to be an improvement. Acked-by: Ben Pfaff <[email protected]> _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
