Re: simple handling of module removals Re: [OKS] Module removal

Keith Owens
2002-07-08T13:13:03Z

On Mon, 08 Jul 2002 23:06:05 +1000,
Keith Owens <kaos@ocs.com.au> wrote:
>The current code tries to use 'increment use count outside module' but
>that has its own race in getting the address of the module. Closing
>that race relies on the interaction between three (yes, three)
>unrelated locks which have to be obtained and released in the right
>order. Not only is this complex and fragile, a quick scan of the
>kernel found one outright bug and several dubious sections of code.

Correction: make that two outright bugs. I have just been told that
one of the dubious bits of code is broken.

Tracking the interaction of multiple locks to ensure that they
correctly prevent a race on incrementing the use count is too messy and
fragile. The offending bits of code were not written by beginners but
by experienced kernel programmers. If experienced programmers get it
wrong, then the method is wrong.