* [PATCH]: Set SOCK_DONE when TCP socket receives FIN
@ 2003-07-14 2:41 Jamie Lokier
2003-07-14 2:56 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jamie Lokier @ 2003-07-14 2:41 UTC (permalink / raw)
To: David S. Miller, Alexey Kuznetsov, linux-kernel
The SOCK_DONE flag is always clear and never set in 2.5.75. Yet there
is code which tests it, and if it's clear, will return -ENOTCONN.
Admittedly I am confused as to how this is not noticed :)
This small patch sets it where it looks like it was intended.
Please check.
Enjoy,
-- Jamie
diff -ur orig-2.5.75/net/ipv4/tcp_input.c build-2.5.75/net/ipv4/tcp_input.c
--- orig-2.5.75/net/ipv4/tcp_input.c 2003-07-12 17:57:38.000000000 +0100
+++ build-2.5.75/net/ipv4/tcp_input.c 2003-07-14 02:29:15.000000000 +0100
@@ -2373,7 +2373,7 @@
tcp_schedule_ack(tp);
sk->sk_shutdown |= RCV_SHUTDOWN;
- sock_reset_flag(sk, SOCK_DONE);
+ sock_set_flag(sk, SOCK_DONE);
switch (sk->sk_state) {
case TCP_SYN_RECV:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH]: Set SOCK_DONE when TCP socket receives FIN
2003-07-14 2:41 [PATCH]: Set SOCK_DONE when TCP socket receives FIN Jamie Lokier
@ 2003-07-14 2:56 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-07-14 2:56 UTC (permalink / raw)
To: Jamie Lokier; +Cc: kuznet, linux-kernel
On Mon, 14 Jul 2003 03:41:00 +0100
Jamie Lokier <jamie@shareable.org> wrote:
> The SOCK_DONE flag is always clear and never set in 2.5.75. Yet there
> is code which tests it, and if it's clear, will return -ENOTCONN.
> Admittedly I am confused as to how this is not noticed :)
>
> This small patch sets it where it looks like it was intended.
> Please check.
Indeed, good catch. This bug got introduced when we changed
all of those volatile char things into a flags bitmask
(ChangeSet 1.889.291.25)
Patch applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-14 2:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-14 2:41 [PATCH]: Set SOCK_DONE when TCP socket receives FIN Jamie Lokier
2003-07-14 2:56 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®