Date: Sun, 6 Nov 2016 16:44:33 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r308376 - stable/10/sys/kern Message-ID: <201611061644.uA6GiXdP046471@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Sun Nov 6 16:44:33 2016 New Revision: 308376 URL: https://svnweb.freebsd.org/changeset/base/308376 Log: MFC r288990: Fix regression from r248371. We need to copy packet header to new mbuf. Unlike in the pre-r248371 code, assert that M_PKTHDR is set only on a first mbuf. PR: 195074 Modified: stable/10/sys/kern/uipc_mbuf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/uipc_mbuf.c ============================================================================== --- stable/10/sys/kern/uipc_mbuf.c Sun Nov 6 16:27:09 2016 (r308375) +++ stable/10/sys/kern/uipc_mbuf.c Sun Nov 6 16:44:33 2016 (r308376) @@ -1994,6 +1994,11 @@ m_unshare(struct mbuf *m0, int how) m_freem(m0); return (NULL); } + if (m->m_flags & M_PKTHDR) { + KASSERT(mprev == NULL, ("%s: m0 %p, m %p has M_PKTHDR", + __func__, m0, m)); + m_move_pkthdr(n, m); + } len = m->m_len; off = 0; mfirst = n;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611061644.uA6GiXdP046471>