Re: owner field in `struct fs'

From: Richard Gooch (rgooch@ras.ucalgary.ca)
Date: Sat Jun 24 2000 - 17:33:18 EST


Alexander Viro writes:
>
> On Sat, 24 Jun 2000, Richard Gooch wrote:
>
> > Alan Cox writes:
> > > > explicit module support, I'm wondering what's wrong with simply
> > > > controlling the module count in the module's open()/release()
> > > > functions in these cases?
> > >
> > > By the time you enter the open function it may have been unloaded
> >
> > So unregister driver methods early on in module removal (before code
> > pages are removed) and wait for the module usage counter to hit zero
> > again before returning from the module cleanup function.
>
> Module removal can not start until the counter is zero, what are you
> talking about?

Yeah, forget that. It won't work. But what should work is if rmmod does:

- if refcount != 0, fail

- launch N-1 RT threads which just hog their CPUs

- wait for RT threads to start (use a pipe, say)

- if refcount != 0, kill RT threads and fail

- remove module

- kill RT threads and exit with success.

                                Regards,

                                        Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:05 EST