svn commit: r274685 - projects/sendfile/sys/netinet
Gleb Smirnoff
glebius at FreeBSD.org
Wed Nov 19 05:43:32 UTC 2014
Author: glebius
Date: Wed Nov 19 05:43:31 2014
New Revision: 274685
URL: https://svnweb.freebsd.org/changeset/base/274685
Log:
In tcp_usr_send() if the pcb appears to be dropped, avoid freeing
M_NOTREADY mbufs.
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
Modified:
projects/sendfile/sys/netinet/tcp_usrreq.c
Modified: projects/sendfile/sys/netinet/tcp_usrreq.c
==============================================================================
--- projects/sendfile/sys/netinet/tcp_usrreq.c Wed Nov 19 05:38:45 2014 (r274684)
+++ projects/sendfile/sys/netinet/tcp_usrreq.c Wed Nov 19 05:43:31 2014 (r274685)
@@ -821,7 +821,11 @@ tcp_usr_send(struct socket *so, int flag
if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) {
if (control)
m_freem(control);
- if (m)
+ /*
+ * In case of PRUS_NOTREADY, tcp_usr_ready() is responsible
+ * for freeing memory.
+ */
+ if (m && (flags & PRUS_NOTREADY) == 0)
m_freem(m);
error = ECONNRESET;
goto out;
More information about the svn-src-projects
mailing list