From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932681Ab0I0IF1 (ORCPT ); Mon, 27 Sep 2010 04:05:27 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:47562 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752620Ab0I0IFZ (ORCPT ); Mon, 27 Sep 2010 04:05:25 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=JcouXLzYxnlWEW/oxSTMYAGgw+unukicDHHQbnaXEcNBwtccIompyu3rkFw38MK2Fi cs4MdECPOkRp0jLFSmS1EzskLRQTT+8E9TwGL/bDWfAfX7Ju1itApr6g4Qh/kt8tPZhI TrustI3uijbSB7nGmh1tUDjYT84Ii3fK5Ftcg= Date: Mon, 27 Sep 2010 16:09:54 +0800 From: =?utf-8?Q?Am=C3=A9rico?= Wang To: Hu Tao Cc: lkml , Rusty Russell , Tejun Heo , Andrew Morton Subject: Re: [PATCH] Update num_symtab, symtab and strtab right after setup of core_num_syms, core_symtab and core_strtab. Message-ID: <20100927080954.GC5785@cr0.nay.redhat.com> References: <20100927073028.GA1040@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100927073028.GA1040@localhost.localdomain> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 27, 2010 at 03:30:28PM +0800, Hu Tao wrote: >Signed-off-by: Hu Tao Changelog is empty. What bug did you observe? >--- > 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; This patch is not correct, symbols that are not core symbols will be dropped right after this piece of code. So NACK.