]> git.baikalelectronics.ru Git - kernel.git/commit
net: openvswitch: introduce common code for flushing flows
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Wed, 12 Aug 2020 09:56:39 +0000 (17:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Aug 2020 22:53:30 +0000 (15:53 -0700)
commitfcfb477122a842c68156ad2246ed41bca8808692
tree0643c4fad96851def0045117bee2dc4fe89ff94a
parent571da1aba7a8d3aa88adef21584f5c88967b9d81
net: openvswitch: introduce common code for flushing flows

To avoid some issues, for example RCU usage warning and double free,
we should flush the flows under ovs_lock. This patch refactors
table_instance_destroy and introduces table_instance_flow_flush
which can be invoked by __dp_destroy or ovs_flow_tbl_flush.

Fixes: 67df6806f2fb ("net: openvswitch: fix possible memleak on destroy flow-table")
Reported-by: Johan Knöös <jknoos@google.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2020-August/050489.html
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/datapath.c
net/openvswitch/flow_table.c
net/openvswitch/flow_table.h