diff options
author | Jim Cromie <jim.cromie@gmail.com> | 2020-07-19 17:10:50 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-24 17:00:09 +0200 |
commit | 47e9f5a82329696b31e7e0672653954f6e9b0f54 (patch) | |
tree | b331745383a9e0d0ffc7f28b3385f7dda59c8622 /lib | |
parent | 9c9d0acbe2793315fa6945a19685ad2a51fb281b (diff) | |
download | linux-stable-47e9f5a82329696b31e7e0672653954f6e9b0f54.tar.gz linux-stable-47e9f5a82329696b31e7e0672653954f6e9b0f54.tar.bz2 linux-stable-47e9f5a82329696b31e7e0672653954f6e9b0f54.zip |
dyndbg: make ddebug_tables list LIFO for add/remove_module
loadable modules are the last in on this list, and are the only
modules that could be removed. ddebug_remove_module() searches from
head, but ddebug_add_module() uses list_add_tail(). Change it to
list_add() for a micro-optimization.
Acked-by: <jbaron@akamai.com>
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Link: https://lore.kernel.org/r/20200719231058.1586423-11-jim.cromie@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dynamic_debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index da3ed54a6521..e879af4e66e0 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -895,7 +895,7 @@ int ddebug_add_module(struct _ddebug *tab, unsigned int n, dt->ddebugs = tab; mutex_lock(&ddebug_lock); - list_add_tail(&dt->link, &ddebug_tables); + list_add(&dt->link, &ddebug_tables); mutex_unlock(&ddebug_lock); v2pr_info("%u debug prints in module %s\n", n, dt->mod_name); |