Date: Sat, 20 Dec 2014 14:19:47 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275955 - head/sys/kern Message-ID: <201412201419.sBKEJlMO042528@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Sat Dec 20 14:19:46 2014 New Revision: 275955 URL: https://svnweb.freebsd.org/changeset/base/275955 Log: 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. Modified: head/sys/kern/uipc_sockbuf.c Modified: head/sys/kern/uipc_sockbuf.c ============================================================================== --- head/sys/kern/uipc_sockbuf.c Sat Dec 20 13:47:38 2014 (r275954) +++ head/sys/kern/uipc_sockbuf.c Sat Dec 20 14:19:46 2014 (r275955) @@ -640,6 +640,9 @@ sbappendstream_locked(struct sockbuf *sb { SOCKBUF_LOCK_ASSERT(sb); + if (m == NULL) + return; + KASSERT(m->m_nextpkt == NULL,("sbappendstream 0")); KASSERT(sb->sb_mb == sb->sb_lastrecord,("sbappendstream 1"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412201419.sBKEJlMO042528>