diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-04-27 20:51:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-25 13:54:07 -0400 |
commit | 8b132ecbcfea8b1b556a832df7290379df79ad79 (patch) | |
tree | 4789c1dc8a2fb8afd6ad343f2ad3e96a35bad349 /arch/x86 | |
parent | 70c9f590ffc3f959cc81c1a3cecb6b8133caf35d (diff) |
x86: fix text_poke()
kernel_text_address returns true even for modules which is not wanted
in text_poke. Use core_kernel_text instead.
This is a regression introduced in e587cadd8f47e202a30712e2906a65a0606d5865
which caused occasionaly crashes after suspend/resume.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
CC: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: Andi Kleen <andi@firstfloor.org>
CC: pageexec@freemail.hu
CC: H. Peter Anvin <hpa@zytor.com>
CC: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/alternative.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index df4099dc1c68..7ab3a9774763 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c | |||
@@ -515,7 +515,7 @@ void *__kprobes text_poke(void *addr, const void *opcode, size_t len) | |||
515 | BUG_ON(len > sizeof(long)); | 515 | BUG_ON(len > sizeof(long)); |
516 | BUG_ON((((long)addr + len - 1) & ~(sizeof(long) - 1)) | 516 | BUG_ON((((long)addr + len - 1) & ~(sizeof(long) - 1)) |
517 | - ((long)addr & ~(sizeof(long) - 1))); | 517 | - ((long)addr & ~(sizeof(long) - 1))); |
518 | if (kernel_text_address((unsigned long)addr)) { | 518 | if (core_kernel_text((unsigned long)addr)) { |
519 | struct page *pages[2] = { virt_to_page(addr), | 519 | struct page *pages[2] = { virt_to_page(addr), |
520 | virt_to_page(addr + PAGE_SIZE) }; | 520 | virt_to_page(addr + PAGE_SIZE) }; |
521 | if (!pages[1]) | 521 | if (!pages[1]) |