Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Nov 2006 01:49:00 -0600
From:      "Scot Hetzel" <swhetzel@gmail.com>
To:        "Kris Kennaway" <kris@obsecurity.org>
Cc:        Bakul Shah <bakul@bitblocks.com>, FreeBSD Ports <freebsd-ports@freebsd.org>, Anders Troback <freebsd@troback.com>
Subject:   Re: Qemu crash...
Message-ID:  <790a9fff0611232349i1388322ai8406469bc213092e@mail.gmail.com>
In-Reply-To: <20061123214220.GA84447@xor.obsecurity.org>
References:  <20061123211532.GB83751@xor.obsecurity.org> <20061123212301.C7C445B3E@mail.bitblocks.com> <20061123214220.GA84447@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/23/06, Kris Kennaway <kris@obsecurity.org> 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 <module> || kldload <module>

Scot
-- 
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0611232349i1388322ai8406469bc213092e>