From owner-freebsd-bugs Sun Jan 2 7:29:32 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from fgwmail7.fujitsu.co.jp (fgwmail7.fujitsu.co.jp [192.51.44.37]) by hub.freebsd.org (Postfix) with ESMTP id 2785014FA0 for ; Sun, 2 Jan 2000 07:29:24 -0800 (PST) (envelope-from shin@nd.net.fujitsu.co.jp) Received: from m3.gw.fujitsu.co.jp by fgwmail7.fujitsu.co.jp (8.9.3/3.7W-MX9912-Fujitsu Gateway) id AAA20231; Mon, 3 Jan 2000 00:29:18 +0900 (JST) (envelope-from shin@nd.net.fujitsu.co.jp) Received: from incapgw.fujitsu.co.jp by m3.gw.fujitsu.co.jp (8.9.3/3.7W-9912-Fujitsu Domain Master) id AAA22239; Mon, 3 Jan 2000 00:29:17 +0900 (JST) Received: from localhost ([192.168.245.136]) by incapgw.fujitsu.co.jp (8.9.3/3.7W-9912) id AAA19951; Mon, 3 Jan 2000 00:29:15 +0900 (JST) To: joe@pavilion.net Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/15742: Laptop -current panics in in6_ifattach after suspend In-Reply-To: <20000102124814.A24810@florence.pavilion.net> References: <20000101163112Y.shin@nd.net.fujitsu.co.jp> <20000102023050X.shin@nd.net.fujitsu.co.jp> <20000102124814.A24810@florence.pavilion.net> X-Mailer: Mew version 1.94 on Emacs 20.4 / Mule 4.0 (HANANOEN) X-Prom-Mew: Prom-Mew 1.93.4 (procmail reader for Mew) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000103002949O.shin@nd.net.fujitsu.co.jp> Date: Mon, 03 Jan 2000 00:29:49 +0900 From: Yoshinobu Inoue X-Dispatcher: imput version 990905(IM130) Lines: 44 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I tried this test with my INET6 defined kernel. > > # pccardc power 1 0 > [pause] > # pccardc power 1 1 > [pause whilst pccardd finds the card, and dhclient get's the ip address]. > > I did it three times, and on the third time the kernel crashed with > exactly the same problems as before. This confirms that it's not an > APM problem. Sorry for my wrong assumption and I think I find out the real problem. in6_control() seems to return error EPERM and not correctly free and unlink AF_INET6 addrs when called from if_detach(). Because if_detach() calls in6_control() with the 5th argument, struct proc *, as NULL, and then, in6_control() think it is called from un-previleged process, and return EPERM. (The reason my machine didn't panic'ed is just because it is lucky.) I think following additional patch should fix the problem. Sorry for taking your time again, but could you please try it? I confirmed that in6_control(), which called from if_detach(), don't return error after this patch in my environment. Yoshinobu Inoue Index: in6.c =================================================================== RCS file: /home/ncvs/src/sys/netinet6/in6.c,v retrieving revision 1.3 diff -u -r1.3 in6.c --- in6.c 1999/12/07 17:39:11 1.3 +++ in6.c 2000/01/02 15:14:30 @@ -414,7 +414,7 @@ int privileged; privileged = 0; - if (p && !suser(p)) + if (p == NULL || !suser(p)) privileged++; /* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message