All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel/extable: fix address-checks for core_kernel and init areas
@ 2013-11-28  8:16 Helge Deller
  0 siblings, 0 replies; only message in thread
From: Helge Deller @ 2013-11-28  8:16 UTC (permalink / raw)
  To: Linux Kernel, linux-parisc, James Bottomley, Ingo Molnar,
	Rusty Russell, Steven Rostedt, Linus Torvalds

The init_kernel_text() and core_kernel_text() functions should not include the
labels _einittext and _etext when checking if an address is inside the .text or
.init sections.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/kernel/extable.c b/kernel/extable.c
index 832cb28..763faf0 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -61,7 +61,7 @@ const struct exception_table_entry *search_exception_tables(unsigned long addr)
 static inline int init_kernel_text(unsigned long addr)
 {
 	if (addr >= (unsigned long)_sinittext &&
-	    addr <= (unsigned long)_einittext)
+	    addr < (unsigned long)_einittext)
 		return 1;
 	return 0;
 }
@@ -69,7 +69,7 @@ static inline int init_kernel_text(unsigned long addr)
 int core_kernel_text(unsigned long addr)
 {
 	if (addr >= (unsigned long)_stext &&
-	    addr <= (unsigned long)_etext)
+	    addr < (unsigned long)_etext)
 		return 1;
 
 	if (system_state == SYSTEM_BOOTING &&

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-28  8:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-28  8:16 [PATCH] kernel/extable: fix address-checks for core_kernel and init areas Helge Deller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.