diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-07-05 19:29:33 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-07-05 19:29:33 +0000 |
commit | 01ce51e89749133bb24d421ece735e81128847ae (patch) | |
tree | 858a030e8105bc9cb7b9b06da8d327fc512b6f38 /sys/kern/uipc_socket.c | |
parent | ed2c20329c5dc725397c93e45772c7480a36c2b2 (diff) | |
download | FreeBSD-src-01ce51e89749133bb24d421ece735e81128847ae.zip FreeBSD-src-01ce51e89749133bb24d421ece735e81128847ae.tar.gz |
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>
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r-- | sys/kern/uipc_socket.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index f771c2e..030ca5b 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1148,8 +1148,11 @@ dontblock: 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; |