diff options
author | Peng He <hepeng.0320@bytedance.com> | 2022-05-26 03:13:17 +0000 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-05-30 23:41:11 +0200 |
commit | 453c1174e1ffba2f43510806f18b7d87a7f16d7a (patch) | |
tree | 9806a94661d244e25d4ab154c3d60ce2ce4fa6f2 | |
parent | 5c46bfb9050499fbe22ca4a0fe803ecbd2ad87b3 (diff) | |
download | openvswitch-453c1174e1ffba2f43510806f18b7d87a7f16d7a.tar.gz |
ofproto-dpif: Fix meter use-after-free.
Add a rcu_barrier before close_dpif_backer to ensure that
all meters have been freed before id_pool_destory meter's
id-pool.
Signed-off-by: Peng He <hepeng.0320@bytedance.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
-rw-r--r-- | ofproto/ofproto-dpif.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index 13122f83c..d270f5f23 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -1810,6 +1810,8 @@ destruct(struct ofproto *ofproto_, bool del) seq_destroy(ofproto->ams_seq); + /* Wait for all the meter destroy work to finish. */ + ovsrcu_barrier(); close_dpif_backer(ofproto->backer, del); } |