Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76189
b: refs/heads/master
c: e14af7e
h: refs/heads/master
i:
  76187: f1727e3
v: v3
  • Loading branch information
Arjan van de Ven authored and Ingo Molnar committed Jan 25, 2008
1 parent f669c6f commit 1f250b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21aa9280b9f4e9e68d3fa8990df6c9d7fd71f994
refs/heads/master: e14af7eeb47ea96c52741c5e5fa010d33daf6973
6 changes: 6 additions & 0 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ static struct module_attribute modinfo_##field = { \
MODINFO_ATTR(version);
MODINFO_ATTR(srcversion);

static char last_unloaded_module[MODULE_NAME_LEN+1];

#ifdef CONFIG_MODULE_UNLOAD
/* Init the unload section of the module. */
static void module_unload_init(struct module *mod)
Expand Down Expand Up @@ -719,6 +721,8 @@ sys_delete_module(const char __user *name_user, unsigned int flags)
mod->exit();
mutex_lock(&module_mutex);
}
/* Store the name of the last unloaded module for diagnostic purposes */
sprintf(last_unloaded_module, mod->name);
free_module(mod);

out:
Expand Down Expand Up @@ -2503,6 +2507,8 @@ void print_modules(void)
printk("Modules linked in:");
list_for_each_entry(mod, &modules, list)
printk(" %s%s", mod->name, module_flags(mod, buf));
if (last_unloaded_module[0])
printk(" [last unloaded: %s]", last_unloaded_module);
printk("\n");
}

Expand Down

0 comments on commit 1f250b3

Please sign in to comment.