Re: 1.99.3 (pre2.0.3) ooops

Linus Torvalds (torvalds@cs.helsinki.fi)
Mon, 13 May 1996 23:07:49 +0300 (EET DST)


On Mon, 13 May 1996, David Flood wrote:
>
> Here's the kernel log, relevant area of System.map, and .config for a
> reproduceable error that occurs when shutdown is invoked (-r or -h doesn't
> matter). I've also seen this on my desktop machine in the same area (differant
> eip but same name from its Syslog.map). This is from a clean copy of the
> tar.gz file, not patched sources. The getty is Redhat 2.1's. This didn't
> occur with 1.99.1 or 1.99.2.

It's the unix domain socket garbage collect code - it's been in the
kernel for some time, but it's been disabled. Duh.

[ btw, it gets a lot easier for me if the kernel dump is prettied up a
bit - ksymoops does this quite well. It's very hard to go throw "raw
data" with very little hints on system map information etc ]

There is at least one missing initialization that might cause this, so if
you can make the error occur at will, please apply this small patch and
tell me if it helps..

Linus
-----
diff -u --recursive --new-file pre2.0.3/linux/net/unix/af_unix.c linux/net/unix/af_unix.c
--- pre2.0.3/linux/net/unix/af_unix.c Mon May 13 23:02:54 1996
+++ linux/net/unix/af_unix.c Mon May 13 23:02:15 1996
@@ -505,6 +505,7 @@
return err;
skb->sk=sk; /* So they know it is us */
skb->free=1;
+ skb->h.filp=NULL;
sk->state=TCP_CLOSE;
unix_mkname(sunaddr, addr_len);
other=unix_find_other(sunaddr->sun_path, &err);
-----