mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-17 21:11:25 +00:00
zebra: fix some memory errors, scheduling bugs
* Add doc comments explaining hairy bits of thread lifecycle * Remove t_suicide as it no longer makes sense * Remove client double-free * Remove unnecessary THREAD_OFF being used in incorrect pthread context * Eliminate unnecessary racey access to client's obuf_fifo * Ensure zserv_process_messages() reschedules itself if it has not finished its work Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
329e35dab8
commit
92be6487a4
@ -109,6 +109,14 @@ static void zebra_client_free(struct zserv *client)
|
|||||||
assert(!client->t_read);
|
assert(!client->t_read);
|
||||||
assert(!client->t_write);
|
assert(!client->t_write);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ensure these have been nulled. This does not equate to the
|
||||||
|
* associated task(s) being scheduled or unscheduled on the client
|
||||||
|
* pthread's threadmaster.
|
||||||
|
*/
|
||||||
|
assert(!client->t_read);
|
||||||
|
assert(!client->t_write);
|
||||||
|
|
||||||
/* Close file descriptor. */
|
/* Close file descriptor. */
|
||||||
if (client->sock) {
|
if (client->sock) {
|
||||||
unsigned long nroutes;
|
unsigned long nroutes;
|
||||||
|
@ -73,9 +73,6 @@ struct zserv {
|
|||||||
struct thread *t_read;
|
struct thread *t_read;
|
||||||
struct thread *t_write;
|
struct thread *t_write;
|
||||||
|
|
||||||
/* Thread for delayed close. */
|
|
||||||
struct thread *t_suicide;
|
|
||||||
|
|
||||||
/* default routing table this client munges */
|
/* default routing table this client munges */
|
||||||
int rtm_table;
|
int rtm_table;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user