Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
2c801f7
)
vcl: fix use-after-free
03/28403/1
author
Benoît Ganne
<
[email protected]
>
Wed, 22 Apr 2020 17:14:03 +0000
(19:14 +0200)
committer
Andrew Yourtchenko
<
[email protected]
>
Thu, 13 Aug 2020 17:20:47 +0000
(17:20 +0000)
Make sure we disconnect from vlib prior to free-ing the last worker, as
we'll need to access it.
Type: fix
Change-Id: Id5bdd17f0f5efa1ce52021b4270eb4f1e95cc61d
Signed-off-by: Benoît Ganne <
[email protected]
>
(cherry picked from commit
38ab5672b599df8ef201ca6733c9b008c37fdfa3
)
src/vcl/vppcom.c
patch
|
blob
|
history
diff --git
a/src/vcl/vppcom.c
b/src/vcl/vppcom.c
index
2c87dff
..
9bf009d
100644
(file)
--- a/
src/vcl/vppcom.c
+++ b/
src/vcl/vppcom.c
@@
-1103,12
+1103,13
@@
vppcom_app_destroy (void)
/* *INDENT-OFF* */
pool_foreach (wrk, vcm->workers, ({
+ if (pool_elts (vcm->workers) == 1)
+ vl_client_disconnect_from_vlib ();
vcl_worker_cleanup (wrk, 0 /* notify vpp */ );
}));
/* *INDENT-ON* */
vcl_elog_stop (vcm);
- vl_client_disconnect_from_vlib ();
/*
* Free the heap and fix vcm