From owner-svn-src-all@FreeBSD.ORG Mon May 5 21:33:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F7DDCBA; Mon, 5 May 2014 21:33:21 +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 2D5D1928; Mon, 5 May 2014 21:33:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s45LXL8O082030; Mon, 5 May 2014 21:33:21 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s45LXLf7082029; Mon, 5 May 2014 21:33:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201405052133.s45LXLf7082029@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 5 May 2014 21:33:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265393 - head/sys/netinet 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 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: Mon, 05 May 2014 21:33:21 -0000 Author: glebius Date: Mon May 5 21:33:20 2014 New Revision: 265393 URL: http://svnweb.freebsd.org/changeset/base/265393 Log: The tcp_log_addrs() uses th pointer, which points into the mbuf, thus we can not free the mbuf before tcp_log_addrs(). Sponsored by: Nginx, Inc. Sponsored by: Netflix Modified: head/sys/netinet/tcp_reass.c Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Mon May 5 21:31:00 2014 (r265392) +++ head/sys/netinet/tcp_reass.c Mon May 5 21:33:20 2014 (r265393) @@ -144,7 +144,6 @@ tcp_reass(struct tcpcb *tp, struct tcphd V_tcp_reass_overflows++; TCPSTAT_INC(tcps_rcvmemdrop); - m_freem(m); *tlenp = 0; if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { @@ -152,6 +151,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd "segment dropped\n", s, __func__); free(s, M_TCPLOG); } + m_freem(m); return (0); }