mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
Add to sbappendstream_locked() a check against NULL mbuf, like it is done
in sbappend_locked() and sbappendrecord_locked(). This is a quick fix to the panic introduced by r274712. A proper solution should be to make sosend_generic() avoid calling pru_send() with NULL mbuf for the protocols that do not understand control messages. Those protocols that understand control messages, should be able to receive NULL mbuf, if control is non-NULL.
This commit is contained in:
parent
ca10a8d944
commit
b7413232f6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=275955
@ -640,6 +640,9 @@ sbappendstream_locked(struct sockbuf *sb, struct mbuf *m, int flags)
|
||||
{
|
||||
SOCKBUF_LOCK_ASSERT(sb);
|
||||
|
||||
if (m == NULL)
|
||||
return;
|
||||
|
||||
KASSERT(m->m_nextpkt == NULL,("sbappendstream 0"));
|
||||
KASSERT(sb->sb_mb == sb->sb_lastrecord,("sbappendstream 1"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user