Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Dec 2000 02:01:33 +0000
From:      Brian Somers <brian@Awfulhak.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        Brian Somers <brian@Awfulhak.org>, smp@FreeBSD.org, archie@FreeBSD.org, brian@Awfulhak.org
Subject:   Re: Netgraph and SMP 
Message-ID:  <200012070201.eB721Yt44116@hak.lan.Awfulhak.org>
In-Reply-To: Message from Julian Elischer <julian@elischer.org>  of "Wed, 06 Dec 2000 06:49:50 PST." <3A2E520E.5E4444BD@elischer.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > 
> >   Inside it's own lock (preventing any other dependent modules from
> >   appearing), it asks the module if it's ok to unload.
> > 
> > This is obviously more tricky than it sounds.  We've got to ensure
> > that if any character device entry points have been created
> > (make_dev() etc), we block the relevant entry points so that we can
> > ENODEV if the MOD_UNLOAD works.
> 
> but what if the process has already entered the driver?

Then it should hold a lock that fails in the kldload syscall when it 
does a mutex_trylock() on it.  Again, this is somewhere that a read/
write mutex would be handy.  kldunload ends up trying for the write 
lock while driver entry points try for the read lock.

-- 
Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@[uk.]OpenBSD.org>
Don't _EVER_ lose your sense of humour !




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




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