Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 1997 18:16:06 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        avalon@coombs.anu.edu.au (Darren Reed)
Cc:        msmith@atrad.adelaide.edu.au, avalon@coombs.anu.edu.au, hackers@freebsd.org
Subject:   Re: Unloading LKMs (was Re: A Desparate Plea for Help...)
Message-ID:  <199704300846.SAA27891@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199704300827.RAA27805@genesis.atrad.adelaide.edu.au> from Darren Reed at "Apr 30, 97 06:26:43 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Darren Reed stands accused of saying:
> > 
> > I expect that you take care to release your hooks before you go though,
> > correct?  There is no way of removing a devsw entry, and often 
> > no check made to ensure that it's safe to go.
> 
> Yes, I release the hooks before going.  The LKM code currently in the kernel
> will clean up the appropriate devsw for you (it saves a copy of the old one
> and copies that back when unloading).

Hmm, I didn't see that before.  It doesn't look like it's used
correctly though; eg. the qcam module hooks itself in rather than
letting _lkm_dev() do it.

Then when its load function returns happily, the bogus entries its
made in the cdevsw are saved as the 'old' values, and thus when it's 
unloaded the saved values are restored and everything is spam.

Am I close?  Anyone?

> Darren

-- 
]] Mike Smith, Software Engineer        msmith@gsoft.com.au             [[
]] Genesis Software                     genesis@gsoft.com.au            [[
]] High-speed data acquisition and      (GSM mobile)     0411-222-496   [[
]] realtime instrument control.         (ph)          +61-8-8267-3493   [[
]] Unix hardware collector.             "Where are your PEZ?" The Tick  [[



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