Re: [patch 2/2] track and print last unloaded module in the oopstrace

From: Ingo Molnar
Date: Tue Jan 08 2008 - 06:24:03 EST



* Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:

> > Right now, only the last 1 module is tracked; I expect that this is
> > enough for the vast majority of cases where this information
> > matters; if it turns out that tracking more is important, we can
> > always extend it to that.
> >
> > Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
>
> Thanks, applied.

needs the fix below.

Ingo

-------------->
Subject: track and print last unloaded module in the oops trace, fix
From: Ingo Molnar <mingo@xxxxxxx>

fix:

kernel/module.c: In function 'print_modules':
kernel/module.c:2508: error: 'last_unloaded_module' undeclared (first use in this function)
kernel/module.c:2508: error: (Each undeclared identifier is reported only once
kernel/module.c:2508: error: for each function it appears in.)

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
kernel/module.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux/kernel/module.c
===================================================================
--- linux.orig/kernel/module.c
+++ linux/kernel/module.c
@@ -498,6 +498,8 @@ static struct module_attribute modinfo_#
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)
@@ -655,8 +657,6 @@ static void wait_for_zero_refcount(struc
mutex_lock(&module_mutex);
}

-static char last_unloaded_module[MODULE_NAME_LEN+1];
-
asmlinkage long
sys_delete_module(const char __user *name_user, unsigned int flags)
{
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/