* [PATCH] X25 fix dead unaccepted sockets
@ 2010-04-18 0:17 Andrew Hendry
2010-04-21 23:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Hendry @ 2010-04-18 0:17 UTC (permalink / raw)
To: netdev
1, An X25 program binds and listens
2, calls arrive waiting to be accepted
3, Program exits without accepting
4, Sockets time out but don't get correctly cleaned up
5, cat /proc/net/x25/socket shows the dead sockets with bad inode fields.
This line borrowed from AX25 sets the dying socket so the timers clean up later.
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
---
net/x25/af_x25.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index cbddd0c..36e84e1 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -402,6 +402,7 @@ static void __x25_destroy_socket(struct sock *sk)
/*
* Queue the unaccepted socket for death
*/
+ skb->sk->sk_state = TCP_LISTEN;
sock_set_flag(skb->sk, SOCK_DEAD);
x25_start_heartbeat(skb->sk);
x25_sk(skb->sk)->state = X25_STATE_0;
--
1.5.6.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] X25 fix dead unaccepted sockets
2010-04-18 0:17 [PATCH] X25 fix dead unaccepted sockets Andrew Hendry
@ 2010-04-21 23:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-04-21 23:32 UTC (permalink / raw)
To: andrew.hendry; +Cc: netdev
From: Andrew Hendry <andrew.hendry@gmail.com>
Date: Sun, 18 Apr 2010 10:17:32 +1000
>
> 1, An X25 program binds and listens
> 2, calls arrive waiting to be accepted
> 3, Program exits without accepting
> 4, Sockets time out but don't get correctly cleaned up
> 5, cat /proc/net/x25/socket shows the dead sockets with bad inode fields.
>
> This line borrowed from AX25 sets the dying socket so the timers clean up later.
>
> Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-21 23:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-18 0:17 [PATCH] X25 fix dead unaccepted sockets Andrew Hendry
2010-04-21 23:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).