From: "David S. Miller" <davem@redhat.com>
To: cw@f00f.org
Cc: linux-kernel@vger.kernel.org, linux-net@vger.kernel.org,
lists@openunix.de, debian-sparc@lists.debian.org,
Ralf.Hildebrandt@charite.de, byron@markerman.com,
john@grabjohn.com
Subject: [PATCH] fix for "assertion (newsk->state != TCP_SYN_RECV) ..."
Date: Thu, 30 Jan 2003 23:18:52 -0800 (PST) [thread overview]
Message-ID: <20030130.231852.18464285.davem@redhat.com> (raw)
Chris and others, this below should cure the infamous:
KERNEL: assertion (newsk->state != TCP_SYN_RECV) failed at tcp.c(2229)
KERNEL: assertion ((1<<sk2->state)&(TCPF_ESTABLISHED|TCPF_CLOSE_WAIT|TCPF_CLOSE)) failed at af_inet.c(689)
assertion failures people have been seeing starting in 2.4.20
The bug is in 2.5.x too, and the patch below applies pretty cleanly
there.
This has been sent to Marcelo already, and Linus will get it for
2.5.x when he gets back.
Thanks to everyone for reporting. The fact that multiple reports
existed made it possible for to figure out what was so common
amongst the reports and thus find the bug relatively quickly.
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.933 -> 1.934
# net/ipv4/tcp_minisocks.c 1.12 -> 1.13
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/01/30 davem@nuts.ninka.net 1.934
# [TCP]: In tcp_check_req, handle ACKless packets properly.
# --------------------------------------------
#
diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
--- a/net/ipv4/tcp_minisocks.c Thu Jan 30 23:08:40 2003
+++ b/net/ipv4/tcp_minisocks.c Thu Jan 30 23:08:40 2003
@@ -938,6 +938,12 @@
if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN))
goto embryonic_reset;
+ /* ACK sequence verified above, just make sure ACK is
+ * set. If ACK not set, just silently drop the packet.
+ */
+ if (!(flg & TCP_FLAG_ACK))
+ return NULL;
+
/* If TCP_DEFER_ACCEPT is set, drop bare ACK. */
if (tp->defer_accept && TCP_SKB_CB(skb)->end_seq == req->rcv_isn+1) {
req->acked = 1;
reply other threads:[~2003-01-31 7:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030130.231852.18464285.davem@redhat.com \
--to=davem@redhat.com \
--cc=Ralf.Hildebrandt@charite.de \
--cc=byron@markerman.com \
--cc=cw@f00f.org \
--cc=debian-sparc@lists.debian.org \
--cc=john@grabjohn.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
--cc=lists@openunix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox