From a40cd3a70f4c7f570d2bb6a377554db8a350966b Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Wed, 1 Mar 2006 19:16:40 -0800 Subject: [PATCH] Fix for TCP_DEFER_ACCEPT regression, fwd from acme --- ...kq_defer_accept-in-reqsk_queue_alloc.patch | 32 +++++++++++++++++++ queue/series | 1 + 2 files changed, 33 insertions(+) create mode 100644 queue/don-t-reset-rskq_defer_accept-in-reqsk_queue_alloc.patch create mode 100644 queue/series diff --git a/queue/don-t-reset-rskq_defer_accept-in-reqsk_queue_alloc.patch b/queue/don-t-reset-rskq_defer_accept-in-reqsk_queue_alloc.patch new file mode 100644 index 00000000000..7d46092bbe3 --- /dev/null +++ b/queue/don-t-reset-rskq_defer_accept-in-reqsk_queue_alloc.patch @@ -0,0 +1,32 @@ +From chrisw@osdl.org Wed Mar 1 12:22:20 2006 +From: Arnaldo Carvalho de Melo +Date: Feb 27, 2006 6:28 PM +Subject: [REQSK] Don't reset rskq_defer_accept in reqsk_queue_alloc +To: "David S. Miller" +Cc: netdev@vger.kernel.org, Andrew Morton , "Alexandra N. Kossovsky" + +In 295f7324ff8d9ea58b4d3ec93b1aaa1d80e048a9 I moved defer_accept from +tcp_sock to request_queue and mistakingly reset it at reqsl_queue_alloc, causing +calls to setsockopt(TCP_DEFER_ACCEPT ) to be lost after bind, the fix is to +remove the zeroing of rskq_defer_accept from reqsl_queue_alloc. + +Thanks to Alexandra N. Kossovsky for +reporting and testing the suggested fix. + +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Chris Wright +--- + + net/core/request_sock.c | 1 - + 1 files changed, 1 deletion(-) + +--- linux-2.6.15.5.orig/net/core/request_sock.c ++++ linux-2.6.15.5/net/core/request_sock.c +@@ -52,7 +52,6 @@ int reqsk_queue_alloc(struct request_soc + get_random_bytes(&lopt->hash_rnd, sizeof(lopt->hash_rnd)); + rwlock_init(&queue->syn_wait_lock); + queue->rskq_accept_head = queue->rskq_accept_head = NULL; +- queue->rskq_defer_accept = 0; + lopt->nr_table_entries = nr_table_entries; + + write_lock_bh(&queue->syn_wait_lock); diff --git a/queue/series b/queue/series new file mode 100644 index 00000000000..1e8c7e3143c --- /dev/null +++ b/queue/series @@ -0,0 +1 @@ +don-t-reset-rskq_defer_accept-in-reqsk_queue_alloc.patch -- 2.47.3