Skip to contentSkip to conversation

netback module exit function

DISCUSSION Kieran Mansley 4 participants 4 messages Oct 24, 2007

lore
Share & tools
lore
#0 lore raw

I just noticed that netback doesn't have a module_exit function. This surprises me given how much the module_init function does. Surely some of this needs cleaning up on exit? e.g. a call to xenbus_unregister_driver() would be wise.

Perhaps it's assumed that netback is never unloaded?

Kieran

#1 lore raw

A module with no module_exit function cannot be unloaded.

-- Keir

Quoted 14 lines · Kieran Mansley

I just noticed that netback doesn't have a module_exit function. This surprises me given how much the module_init function does. Surely some of this needs cleaning up on exit? e.g. a call to xenbus_unregister_driver() would be wise.

Perhaps it's assumed that netback is never unloaded?

Kieran

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
In reply to Kieran Mansley
Quoted 6 lines · Kieran Mansley

I just noticed that netback doesn't have a module_exit function. This surprises me given how much the module_init function does. Surely some of this needs cleaning up on exit? e.g. a call to xenbus_unregister_driver() would be wise.

Perhaps it's assumed that netback is never unloaded?

Not having a module_exit function means it can't be unloaded (without forcing it).

sys_delete_module(const char __user *name_user, unsigned int flags) {
...

        /* If it has an init func, it must have an exit func to unload 		
	 */
        if ((mod->init != NULL && mod->exit == NULL)
            || mod->unsafe) {
                forced = try_force_unload(flags);
                if (!forced) {
                        /* This module can't be removed */
                        ret = -EBUSY;
                        goto out;
                }
        }

...
}

Ian.

#3 lore raw
In reply to Kieran Mansley
Quoted 6 lines

I just noticed that netback doesn't have a module_exit function. This surprises me given how much the module_init function does. Surely some of this needs cleaning up on exit? e.g. a call to xenbus_unregister_driver() would be wise.

Perhaps it's assumed that netback is never unloaded?

I don't think anybody has ever had the motivation to figure out what's needed to make it safely unloadable.

Cheers,
Mark

Signature · 4 lines
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!