]> git.puffer.fish Git - mirror/frr.git/commit
zebra: Ensure memory is not freed that dplane depends on in shutdown 12538/head
authorDonald Sharp <sharpd@nvidia.com>
Sat, 17 Dec 2022 19:09:29 +0000 (14:09 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Sat, 17 Dec 2022 19:09:29 +0000 (14:09 -0500)
commit0e61463a8e43becac9b74c5895993df70b53de4d
treeaa9cbf844597a728a0fb566e3670d19bdcdf7fbb
parent507621139bf506b76a587435f969daf86a035b95
zebra: Ensure memory is not freed that dplane depends on in shutdown

Zebra has a shutdown setup where it asks the dplane to shutdown but can
still be processing data.  This is especially true if something the dplane
is listening on receives data that will be processed by the main dplane thread
from netlink.   When zebra_finalize is called it is possible that a bit
of data comes in before the zebra_dplane_shutdown() function is called
and the memory freed in ns_walk_func() causes the main dplane event
to crash when it cannot find the ns data anymore.

Reverse the order, stop the zebra dplane pthread and then free the
memory associated with the namespaces.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra/main.c