From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 19:27:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44D7F606; Thu, 4 Sep 2014 19:27:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 305711AB6; Thu, 4 Sep 2014 19:27:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84JRVwI003846; Thu, 4 Sep 2014 19:27:31 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84JRVkn003845; Thu, 4 Sep 2014 19:27:31 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409041927.s84JRVkn003845@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 4 Sep 2014 19:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271122 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 19:27:31 -0000 Author: glebius Date: Thu Sep 4 19:27:30 2014 New Revision: 271122 URL: http://svnweb.freebsd.org/changeset/base/271122 Log: Change a very strange code in m_demote() to simple assertion. Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Thu Sep 4 19:22:01 2014 (r271121) +++ head/sys/kern/uipc_mbuf.c Thu Sep 4 19:27:30 2014 (r271122) @@ -393,17 +393,13 @@ m_demote(struct mbuf *m0, int all) struct mbuf *m; for (m = all ? m0 : m0->m_next; m != NULL; m = m->m_next) { + KASSERT(m->m_nextpkt == NULL, ("%s: m_nextpkt in m %p, m0 %p", + __func__, m, m0)); if (m->m_flags & M_PKTHDR) { m_tag_delete_chain(m, NULL); m->m_flags &= ~M_PKTHDR; bzero(&m->m_pkthdr, sizeof(struct pkthdr)); } - if (m != m0 && m->m_nextpkt != NULL) { - KASSERT(m->m_nextpkt == NULL, - ("%s: m_nextpkt not NULL", __func__)); - m_freem(m->m_nextpkt); - m->m_nextpkt = NULL; - } m->m_flags = m->m_flags & (M_EXT|M_RDONLY|M_NOFREE); } }