Re: [PATCH] EVMS core (3/9) discover.c

Mark Peloquin (peloquin@us.ibm.com)
Thu, 10 Oct 2002 17:53:55 -0500


On 10/10/2002 at 05:19 PM, Andi Kleen wrote:

> > We plan to register a "__this_module.can_unload()" that
> > should prevent plugin modules from unloading during
> > discovery.

> Ok in this case. But how about when you search that list later after
> discovery for some reason and drop the lock. Then you could race with
someone
> else removing the plugin inbetween, no ?

The only time the lock is released while actively
searching the list is during discovery and direct
ioctl communication. So yes, you are correct, the
can_unload() would have to take both operations
into account. All other list operations take
place completely inside the lock. All in-use
plugins are kept from unloading by module ref
counts. Outside of the scope of the discover and
direct ioctl operations, any unused plugins
should be safe to unload.

Is something being missed?

Mark

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