When the MT_SONAME mbuf is popped off of a receive socket buffer
associated with a PR_ADDR protocol, make sure to update the m_nextpkt pointer of the new head mbuf on the chain to point to the next record. Otherwise, when we release the socket buffer mutex, the socket buffer mbuf chain may be in an inconsistent state.
This commit is contained in:
parent
82ebaee7a3
commit
7e17bc9f26
@ -1001,6 +1001,8 @@ soreceive(so, psa, uio, mp0, controlp, flagsp)
|
||||
sbfree(&so->so_rcv, m);
|
||||
so->so_rcv.sb_mb = m_free(m);
|
||||
m = so->so_rcv.sb_mb;
|
||||
if (m != NULL)
|
||||
m->m_nextpkt = nextrecord;
|
||||
}
|
||||
}
|
||||
while (m != NULL && m->m_type == MT_CONTROL && error == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user