* + dynamic-debug-move-ddebug_remove_module-down-into-free_module.patch added to -mm tree
@ 2010-07-21 21:34 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2010-07-21 21:34 UTC (permalink / raw)
To: mm-commits; +Cc: jbaron, stable, trenn
The patch titled
dynamic debug: move ddebug_remove_module() down into free_module()
has been added to the -mm tree. Its filename is
dynamic-debug-move-ddebug_remove_module-down-into-free_module.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: dynamic debug: move ddebug_remove_module() down into free_module()
From: Jason Baron <jbaron@redhat.com>
The command
echo "file ec.c +p" >/sys/kernel/debug/dynamic_debug/control
causes an oops.
Move the call to ddebug_remove_module() down into free_module(). In this
way it should be called from all error paths. Currently, we are missing
the remove if the module init routine fails.
Signed-off-by: Jason Baron <jbaron@redhat.com>
Reported-by: Thomas Renninger <trenn@suse.de>
Tested-by: Thomas Renninger <trenn@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/module.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff -puN kernel/module.c~dynamic-debug-move-ddebug_remove_module-down-into-free_module kernel/module.c
--- a/kernel/module.c~dynamic-debug-move-ddebug_remove_module-down-into-free_module
+++ a/kernel/module.c
@@ -787,7 +787,6 @@ SYSCALL_DEFINE2(delete_module, const cha
/* Store the name of the last unloaded module for diagnostic purposes */
strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
- ddebug_remove_module(mod->name);
free_module(mod);
return 0;
@@ -1550,6 +1549,9 @@ static void free_module(struct module *m
remove_sect_attrs(mod);
mod_kobject_remove(mod);
+ /* Remove dynamic debug info */
+ ddebug_remove_module(mod->name);
+
/* Arch-specific cleanup. */
module_arch_cleanup(mod);
_
Patches currently in -mm which might be from jbaron@redhat.com are
dynamic-debug-move-ddebug_remove_module-down-into-free_module.patch
linux-next.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-21 21:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-21 21:34 + dynamic-debug-move-ddebug_remove_module-down-into-free_module.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox