diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-07-10 21:43:35 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-07-10 21:43:35 +0000 |
commit | 7fd91e098499950141b8f1d34cbac8b2c275ee02 (patch) | |
tree | ae5068edf1ea736d4e2431a2cc55ef417bc65116 /sys/kern/uipc_socket.c | |
parent | 54e2d39fa084cad1ce98614653948c6a8251887d (diff) | |
download | FreeBSD-src-7fd91e098499950141b8f1d34cbac8b2c275ee02.zip FreeBSD-src-7fd91e098499950141b8f1d34cbac8b2c275ee02.tar.gz |
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.
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r-- | sys/kern/uipc_socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index ae2442e..1d37b23 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1001,6 +1001,8 @@ dontblock: 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) { |