lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri,  4 Sep 2009 11:48:28 +0800
From:	Wu Zhangjin <wuzhangjin@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	James Bottomley <James.Bottomley@...e.de>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Helge Deller <deller@....de>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Wu Zhangjin <wuzhangjin@...il.com>
Subject: [PATCH] fix "no member named 'sect_attrs' of strcut module"

From: Wu Zhangjin <wuzhangjin@...il.com>

The commit(1b364bf438cf337a3818aee77d68c0713f3e1fc4, "module: workaround
duplicate section names") introduced a condition to avoid null pointer
reference:

-       add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+       if (mod->sect_attrs)
+               add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);

but sect_attrs is only defined when CONFIG_KALLSYMS enabled, so this
patch is need to fix the following error:

error: 'struct module' has no member named 'sect_attrs'

Signed-off-by: Wu Zhangjin <wuzhangjin@...il.com>
---
 kernel/module.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index eccb561..b4016d1 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2355,8 +2355,10 @@ static noinline struct module *load_module(void __user *umod,
 	if (err < 0)
 		goto unlink;
 	add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+#ifdef CONFIG_KALLSYMS
 	if (mod->sect_attrs)
 		add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
+#endif
 
 	/* Get rid of temporary copy */
 	vfree(hdr);
-- 
1.6.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ