From owner-freebsd-ports@FreeBSD.ORG Fri Nov 24 07:49:02 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C8E716A412 for ; Fri, 24 Nov 2006 07:49:02 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2137C43D53 for ; Fri, 24 Nov 2006 07:48:21 +0000 (GMT) (envelope-from swhetzel@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so558893uge for ; Thu, 23 Nov 2006 23:49:00 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TPTnf1i3PYt3bn1ffTKfTZXqxv5cFgVyAk07k/u7WAjiQvZpmNJhE764nuSQT9af9FsrEL3cJHgAzvTe0sD8nTW7HarRC6EbcJJf0r8w88KJ2GI1q9WcNmcRoWxgVenu2GBfXsfRQ8ojyK1BV/dbEblfyUYemBNGji4jY4OaV0w= Received: by 10.66.248.5 with SMTP id v5mr6239127ugh.1164354540357; Thu, 23 Nov 2006 23:49:00 -0800 (PST) Received: by 10.67.86.8 with HTTP; Thu, 23 Nov 2006 23:49:00 -0800 (PST) Message-ID: <790a9fff0611232349i1388322ai8406469bc213092e@mail.gmail.com> Date: Fri, 24 Nov 2006 01:49:00 -0600 From: "Scot Hetzel" To: "Kris Kennaway" In-Reply-To: <20061123214220.GA84447@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061123211532.GB83751@xor.obsecurity.org> <20061123212301.C7C445B3E@mail.bitblocks.com> <20061123214220.GA84447@xor.obsecurity.org> Cc: Bakul Shah , FreeBSD Ports , Anders Troback Subject: Re: Qemu crash... X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Nov 2006 07:49:02 -0000 On 11/23/06, Kris Kennaway wrote: > On Thu, Nov 23, 2006 at 01:23:01PM -0800, Bakul Shah wrote: > > > The problem is that kldloading a module if it's already in the kernel > > > can cause a panic. Also if the module becomes stale with respect to > > > the running kernel, this approach can cause a lot of confusion. > > > > I thought the following would do the trick: > > > > kldstat -m aio >/devnull 2>&1 || kldload aio > > > > > Something I'd like to see is > > > > > > a) Fixing the kldload "double load" problems > > > > See above. Works in -current at least. > > It "should" work, but people sometimes report that it doesn't > (i.e. when they get the resulting panic). It at least needs to be > investigated. > I ran across this problem when trying to write a port for my wireless adapter, to determine if the kernel module was loaded, so that it could be unloaded before the module was removed from the system: hp010# kldload ./bcmwl564_sys.ko hp010# kldstat | grep bcm 11 1 0xffffffffa2d8b000 84f20 bcmwl564_sys.ko hp010# kldstat -m bcmwl564_sys kldstat: can't find module bcmwl564_sys: No such file or directory hp010# kldstat -m pci/bcmwl564_sys Id Refs Name 378 1 pci/bcmwl564_sys I found that value by using kldstat -v, and picking one of of the named modules listed under bcmwl564_sys.ko. This could be why people are seeing the folowing fail: kldstat -qm || kldload Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised.