mirror of https://github.com/FRRouting/frr.git
Merge pull request #15476 from donaldsharp/dplane_thread_issue_i_believe
zebra: fnc->obuf could be accessed without a lock
This commit is contained in:
commit
fa5acd5a16
|
@ -1465,8 +1465,14 @@ static void fpm_process_queue(struct event *t)
|
|||
uint64_t processed_contexts = 0;
|
||||
|
||||
while (true) {
|
||||
size_t writeable_amount;
|
||||
|
||||
frr_with_mutex (&fnc->obuf_mutex) {
|
||||
writeable_amount = STREAM_WRITEABLE(fnc->obuf);
|
||||
}
|
||||
|
||||
/* No space available yet. */
|
||||
if (STREAM_WRITEABLE(fnc->obuf) < NL_PKT_BUF_SIZE) {
|
||||
if (writeable_amount < NL_PKT_BUF_SIZE) {
|
||||
no_bufs = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue