Drop the socket buffer lock around a call to m_copym() with M_TRYWAIT.
A subset of locking changes to soreceive() in the queue for merging. Bumped into by: Willem Jan Withagen <wjw@withagen.nl>
This commit is contained in:
parent
ed2c20329c
commit
01ce51e897
@ -1148,8 +1148,11 @@ soreceive(so, psa, uio, mp0, controlp, flagsp)
|
||||
if (flags & MSG_PEEK)
|
||||
moff += len;
|
||||
else {
|
||||
if (mp != NULL)
|
||||
if (mp != NULL) {
|
||||
SOCKBUF_UNLOCK(&so->so_rcv);
|
||||
*mp = m_copym(m, 0, len, M_TRYWAIT);
|
||||
SOCKBUF_LOCK(&so->so_rcv);
|
||||
}
|
||||
m->m_data += len;
|
||||
m->m_len -= len;
|
||||
so->so_rcv.sb_cc -= len;
|
||||
|
Loading…
Reference in New Issue
Block a user