Revert rev 1.241: calling m_makewritable() in tcp_input causes problems when

it has to change the mbuf chain. I experience hard hang on a Xen2 domU after
TCP connections have been closed, and a crash has been reported which may be
caused by this too.
This commit is contained in:
bouyer 2006-05-27 13:35:20 +00:00
parent 8bd6a6b9bd
commit 01307555ec

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcp_input.c,v 1.241 2006/05/25 21:49:19 bouyer Exp $ */
/* $NetBSD: tcp_input.c,v 1.242 2006/05/27 13:35:20 bouyer Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -150,7 +150,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.241 2006/05/25 21:49:19 bouyer Exp $");
__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.242 2006/05/27 13:35:20 bouyer Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@ -1024,13 +1024,6 @@ tcp_input(struct mbuf *m, ...)
case 4:
af = AF_INET;
iphlen = sizeof(struct ip);
#if BYTE_ORDER == LITTLE_ENDIAN
if (__predict_false(m_makewritable(&m, toff,
sizeof(struct tcphdr), M_DONTWAIT))) {
m_freem(m);
return;
}
#endif
ip = mtod(m, struct ip *);
IP6_EXTHDR_GET(th, struct tcphdr *, m, toff,
sizeof(struct tcphdr));
@ -1048,13 +1041,6 @@ tcp_input(struct mbuf *m, ...)
ip = NULL;
iphlen = sizeof(struct ip6_hdr);
af = AF_INET6;
#if BYTE_ORDER == LITTLE_ENDIAN
if (__predict_false(m_makewritable(&m, toff,
sizeof(struct tcphdr), M_DONTWAIT))) {
m_freem(m);
return;
}
#endif
ip6 = mtod(m, struct ip6_hdr *);
IP6_EXTHDR_GET(th, struct tcphdr *, m, toff,
sizeof(struct tcphdr));