mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
Move ic_check_send_space clear to the actual check.
It closes tiny race when the flag could be set between being cleared
and the space is checked, that would create us some more work. The
flag setting is protected by both locks, so we can clear it in either
place, but in between both locks are dropped.
MFC after: 1 week
(cherry picked from commit afc3e54eee)
This commit is contained in:
parent
8b0101da80
commit
aae8e02dfc
1 changed files with 1 additions and 1 deletions
|
|
@ -866,6 +866,7 @@ icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu_stailq *queue)
|
|||
* of error.
|
||||
*/
|
||||
available = sbspace(&so->so_snd);
|
||||
ic->ic_check_send_space = false;
|
||||
|
||||
/*
|
||||
* Notify the socket upcall that we don't need wakeups
|
||||
|
|
@ -978,7 +979,6 @@ icl_send_thread(void *arg)
|
|||
if (STAILQ_EMPTY(&queue) || ic->ic_check_send_space)
|
||||
STAILQ_CONCAT(&queue, &ic->ic_to_send);
|
||||
|
||||
ic->ic_check_send_space = false;
|
||||
ICL_CONN_UNLOCK(ic);
|
||||
icl_conn_send_pdus(ic, &queue);
|
||||
ICL_CONN_LOCK(ic);
|
||||
|
|
|
|||
Loading…
Reference in a new issue