-
Jarno Rajahalme authored
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 <wangyunjian@huawei.com> Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
4f678069