From: Hu Tao <hutao@cn.fujitsu.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>, Tejun Heo <tj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] Update num_symtab, symtab and strtab right after setup of core_num_syms, core_symtab and core_strtab.
Date: Mon, 27 Sep 2010 15:30:28 +0800 [thread overview]
Message-ID: <20100927073028.GA1040@localhost.localdomain> (raw)
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
kernel/module.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/kernel/module.c b/kernel/module.c
index d0b5f8d..d5dc98b 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2029,6 +2029,10 @@ static void add_kallsyms(struct module *mod, const struct load_info *info)
for (*s = 0, i = 1; i < info->sechdrs[info->index.str].sh_size; ++i)
if (test_bit(i, info->strmap))
*++s = mod->strtab[i];
+
+ mod->num_symtab = mod->core_num_syms;
+ mod->symtab = mod->core_symtab;
+ mod->strtab = mod->core_strtab;
}
#else
static inline void layout_symtab(struct module *mod, struct load_info *info)
@@ -2738,11 +2742,6 @@ SYSCALL_DEFINE3(init_module, void __user *, umod,
/* Drop initial reference. */
module_put(mod);
trim_init_extable(mod);
-#ifdef CONFIG_KALLSYMS
- mod->num_symtab = mod->core_num_syms;
- mod->symtab = mod->core_symtab;
- mod->strtab = mod->core_strtab;
-#endif
module_free(mod, mod->module_init);
mod->module_init = NULL;
mod->init_size = 0;
--
1.7.3
next reply other threads:[~2010-09-27 7:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 7:30 Hu Tao [this message]
2010-09-27 8:09 ` [PATCH] Update num_symtab, symtab and strtab right after setup of core_num_syms, core_symtab and core_strtab Américo Wang
2010-09-27 8:22 ` Hu Tao
2010-09-27 8:54 ` Américo Wang
2010-09-28 0:55 ` Hu Tao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100927073028.GA1040@localhost.localdomain \
--to=hutao@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox