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 Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
A module with no module_exit function cannot be unloaded. -- Keir On 24/10/07 16:10, "Kieran Mansley" <kmansley@solarflare.com> wrote:> 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 > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, 2007-10-24 at 16:10 +0100, Kieran Mansley wrote:> 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. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> 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 -- 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! _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel