Re: oops in __release_sock() [2.0.35]

Michael L. Galbraith (mikeg@weiden.de)
Sun, 4 Oct 1998 17:37:31 +0200 (CEST)


On Sun, 4 Oct 1998, Chris Evans wrote:

>
> On Sat, 3 Oct 1998, Andrea Arcangeli wrote:
>
> > The problem is that a sock is been just kfreed and reused from other
> > pieces of code at release_sock() time.
>
> > sk->dead = 1;
> > release_sock(sk);
>
> Hi Andrea,
>
> Aaargh. This problem is much worse than a "harmless __release_sock oops"
> then. Before the oops is triggered in release_sock, the line
>
> sk->dead = 1
>
> has trashed some random kernel memory!!
>
> Could explain a mysterious crash or two we've had :-) We see the
> __release_sock oops every now and again.
>
> Chris

Hi Chris and Andrea,

I just tried moving the lock_sock(sk) back from tcp_close() into
inet_release() after reading the comments in inet_release() where
it says..
/* Start closing the connection. This may take a while. */

(Not that I know anything about the subject mind you, but what the
heck, I figure you have to give dumb luck a _chance_ to happen :)

At any rate, my little laptop shows the problem in a very repeatable
fashion, so it's available for 'try this and that' test things.

-Mike

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/