diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-26 16:39:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-27 12:28:43 -0400 |
commit | 6e15cf04860074ad032e88c306bea656bbdd0f22 (patch) | |
tree | c346383bb7563e8d66b2f4a502f875b259c34870 /arch/x86/kernel/alternative.c | |
parent | be0ea69674ed95e1e98cb3687a241badc756d228 (diff) | |
parent | 60db56422043aaa455ac7f858ce23c273220f9d9 (diff) |
Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2
Conflicts:
arch/parisc/kernel/irq.c
arch/x86/include/asm/fixmap_64.h
arch/x86/include/asm/setup.h
kernel/irq/handle.c
Semantic merge:
arch/x86/include/asm/fixmap.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/alternative.c')
-rw-r--r-- | arch/x86/kernel/alternative.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index a84ac7b570e6..6907b8e85d52 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c | |||
@@ -498,12 +498,12 @@ void *text_poke_early(void *addr, const void *opcode, size_t len) | |||
498 | */ | 498 | */ |
499 | void *__kprobes text_poke(void *addr, const void *opcode, size_t len) | 499 | void *__kprobes text_poke(void *addr, const void *opcode, size_t len) |
500 | { | 500 | { |
501 | unsigned long flags; | ||
502 | char *vaddr; | 501 | char *vaddr; |
503 | int nr_pages = 2; | 502 | int nr_pages = 2; |
504 | struct page *pages[2]; | 503 | struct page *pages[2]; |
505 | int i; | 504 | int i; |
506 | 505 | ||
506 | might_sleep(); | ||
507 | if (!core_kernel_text((unsigned long)addr)) { | 507 | if (!core_kernel_text((unsigned long)addr)) { |
508 | pages[0] = vmalloc_to_page(addr); | 508 | pages[0] = vmalloc_to_page(addr); |
509 | pages[1] = vmalloc_to_page(addr + PAGE_SIZE); | 509 | pages[1] = vmalloc_to_page(addr + PAGE_SIZE); |
@@ -517,9 +517,9 @@ void *__kprobes text_poke(void *addr, const void *opcode, size_t len) | |||
517 | nr_pages = 1; | 517 | nr_pages = 1; |
518 | vaddr = vmap(pages, nr_pages, VM_MAP, PAGE_KERNEL); | 518 | vaddr = vmap(pages, nr_pages, VM_MAP, PAGE_KERNEL); |
519 | BUG_ON(!vaddr); | 519 | BUG_ON(!vaddr); |
520 | local_irq_save(flags); | 520 | local_irq_disable(); |
521 | memcpy(&vaddr[(unsigned long)addr & ~PAGE_MASK], opcode, len); | 521 | memcpy(&vaddr[(unsigned long)addr & ~PAGE_MASK], opcode, len); |
522 | local_irq_restore(flags); | 522 | local_irq_enable(); |
523 | vunmap(vaddr); | 523 | vunmap(vaddr); |
524 | sync_core(); | 524 | sync_core(); |
525 | /* Could also do a CLFLUSH here to speed up CPU recovery; but | 525 | /* Could also do a CLFLUSH here to speed up CPU recovery; but |