From owner-freebsd-current@FreeBSD.ORG Sun Jun 20 16:01:10 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 369CA16A4CE for ; Sun, 20 Jun 2004 16:01:10 +0000 (GMT) Received: from www.mmlab.cse.yzu.edu.tw (www.mmlab.cse.yzu.edu.tw [140.138.145.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02BB443D39 for ; Sun, 20 Jun 2004 16:01:10 +0000 (GMT) (envelope-from avatar@mmlab.cse.yzu.edu.tw) Received: by www.mmlab.cse.yzu.edu.tw (qmail, from userid 1000) id CDA5F4EFCD1; Mon, 21 Jun 2004 00:01:04 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by www.mmlab.cse.yzu.edu.tw (qmail) with ESMTP id C40A74EFCD0 for ; Mon, 21 Jun 2004 00:01:04 +0800 (CST) Date: Mon, 21 Jun 2004 00:01:04 +0800 (CST) From: Tai-hwa Liang To: freebsd-current@freebsd.org Message-ID: <040620234141A.22488@www.mmlab.cse.yzu.edu.tw> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: kldload random.ko panics -CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 16:01:10 -0000 Hi, Apparently, loading the module random.ko in -CURRENT always panics the kernel unless the random device was not compiled in the kernel. With a 5.2-RELEASE kernel, the panic message was: WARNING: Driver mistake: destroy_dev on .... don't do that With recent GENERIC kernel cvsup'ed on Jun-20-2004: can't re-use a leaf (gengateinterval)! can't re-use a leaf (bins)! can't re-use a leaf (fastthresh) can't re-use a leaf (slowthresh) can't re-use a leaf (slowoverthersh) panic: mutex "random reseed" 0xc0a2dcc0 already initialized. cpuid = 0; Debugger("panic") stop at Debugger + 0x46: xchgl %ebx, in_Debugger.0 db> Since I always left random as a kernel module and load it in loader.conf, the system always panics if I forget to unload the module before booting the latest GENERIC kernel(for testing purpose). I'm aware of that the answer may be "don't do it, use static compiled random device instead!" However, shouldn't there be any foot-shooting prevention mechanism in the random device? I'm wondering about why this module loading panicked instead of bailing out with something like "kldload: can't load random: File exists?"