Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 May 2014 21:33:21 +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: r265393 - head/sys/netinet
Message-ID:  <201405052133.s45LXLf7082029@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405052133.s45LXLf7082029>