From: Ian Campbell Subject: Re: netback module exit function Date: Wed, 24 Oct 2007 16:16:50 +0100 Message-ID: <1193239010.4293.31.camel@localhost.localdomain> References: <1193238612.4224.23.camel@moonstone.uk.level5networks.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1193238612.4224.23.camel@moonstone.uk.level5networks.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kieran Mansley Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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.