Re: [Linux-decnet-user] Closing DECNET connections
Brought to you by:
chrissie_c,
ph3-der-loewe
|
From: Patrick C. <pa...@ty...> - 2002-04-18 14:59:19
|
On Thu, Apr 18, 2002 at 02:51:52PM +0100, Steven Whitehouse wrote:
> Hi,
>
> >
> Patrick says that it happens in 2.4.0, so you could try something older than
> that, but I certainly wouldn't recommend using it for production at all. It
> seems that there is a real bug here, but I'm unfortunately rather short of
> time to investigate it right now.
>
> I wonder if its actually a DECnet system call that gets interrupted in
> such a way as to get a reference count wrong during the exit code path
> and thus the socket never gets destroyed.
>
> Its odd because when the process exits, the release method should be called
> for the socket and that has all the socket shut down code in it so whatever
> happens it should work, though I know it doesn't,
>
Here's a patch which works for me:
$ diff -u net/decnet/af_decnet.c.orig net/decnet/af_decnet.c
--- net/decnet/af_decnet.c.orig Thu Apr 18 15:46:11 2002
+++ net/decnet/af_decnet.c Thu Apr 18 15:46:34 2002
@@ -747,10 +747,10 @@
struct sock *sk = sock->sk;
if (sk) {
- sock_orphan(sk);
sock_hold(sk);
lock_sock(sk);
dn_destroy_sock(sk);
+ sock_orphan(sk);
release_sock(sk);
sock_put(sk);
}
I'll forward it to Dave Miller for inclusion in the stock kernel.
patrick
|