diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-17 19:24:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-17 19:24:09 -0400 |
commit | de74646c603fa71d1587f1ba5c761d009624abd7 (patch) | |
tree | a9d521a4e13fddaa8c6703d7c4e255795235db15 | |
parent | a5e135122c9c5af9e63962e13159174c3aaea858 (diff) | |
parent | 1c7e7f6c0703d03af6bcd5ccc11fc15d23e5ecbe (diff) |
Merge branch 'akpm' (Andrew's patch-bomb)
Merge Andrew's remaining patches for 3.5:
"Nine fixes"
* Merge emailed patches from Andrew Morton <akpm@linux-foundation.org>: (9 commits)
mm: fix lost kswapd wakeup in kswapd_stop()
m32r: make memset() global for CONFIG_KERNEL_BZIP2=y
m32r: add memcpy() for CONFIG_KERNEL_GZIP=y
m32r: consistently use "suffix-$(...)"
m32r: fix 'fix breakage from "m32r: use generic ptrace_resume code"' fallout
m32r: fix pull clearing RESTORE_SIGMASK into block_sigmask() fallout
m32r: remove duplicate definition of PTRACE_O_TRACESYSGOOD
mn10300: fix "pull clearing RESTORE_SIGMASK into block_sigmask()" fallout
bootmem: make ___alloc_bootmem_node_nopanic() really nopanic
-rw-r--r-- | arch/m32r/boot/compressed/Makefile | 6 | ||||
-rw-r--r-- | arch/m32r/boot/compressed/misc.c | 12 | ||||
-rw-r--r-- | arch/m32r/include/asm/ptrace.h | 3 | ||||
-rw-r--r-- | arch/m32r/kernel/ptrace.c | 7 | ||||
-rw-r--r-- | arch/m32r/kernel/signal.c | 2 | ||||
-rw-r--r-- | arch/mn10300/kernel/signal.c | 5 | ||||
-rw-r--r-- | mm/bootmem.c | 4 | ||||
-rw-r--r-- | mm/vmscan.c | 5 |
8 files changed, 29 insertions, 15 deletions
diff --git a/arch/m32r/boot/compressed/Makefile b/arch/m32r/boot/compressed/Makefile index 177716b1d613..01729c2979ba 100644 --- a/arch/m32r/boot/compressed/Makefile +++ b/arch/m32r/boot/compressed/Makefile | |||
@@ -43,9 +43,9 @@ endif | |||
43 | 43 | ||
44 | OBJCOPYFLAGS += -R .empty_zero_page | 44 | OBJCOPYFLAGS += -R .empty_zero_page |
45 | 45 | ||
46 | suffix_$(CONFIG_KERNEL_GZIP) = gz | 46 | suffix-$(CONFIG_KERNEL_GZIP) = gz |
47 | suffix_$(CONFIG_KERNEL_BZIP2) = bz2 | 47 | suffix-$(CONFIG_KERNEL_BZIP2) = bz2 |
48 | suffix_$(CONFIG_KERNEL_LZMA) = lzma | 48 | suffix-$(CONFIG_KERNEL_LZMA) = lzma |
49 | 49 | ||
50 | $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE | 50 | $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE |
51 | $(call if_changed,ld) | 51 | $(call if_changed,ld) |
diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c index 370d60881977..28a09529f206 100644 --- a/arch/m32r/boot/compressed/misc.c +++ b/arch/m32r/boot/compressed/misc.c | |||
@@ -28,7 +28,7 @@ static unsigned long free_mem_ptr; | |||
28 | static unsigned long free_mem_end_ptr; | 28 | static unsigned long free_mem_end_ptr; |
29 | 29 | ||
30 | #ifdef CONFIG_KERNEL_BZIP2 | 30 | #ifdef CONFIG_KERNEL_BZIP2 |
31 | static void *memset(void *s, int c, size_t n) | 31 | void *memset(void *s, int c, size_t n) |
32 | { | 32 | { |
33 | char *ss = s; | 33 | char *ss = s; |
34 | 34 | ||
@@ -39,6 +39,16 @@ static void *memset(void *s, int c, size_t n) | |||
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #ifdef CONFIG_KERNEL_GZIP | 41 | #ifdef CONFIG_KERNEL_GZIP |
42 | void *memcpy(void *dest, const void *src, size_t n) | ||
43 | { | ||
44 | char *d = dest; | ||
45 | const char *s = src; | ||
46 | while (n--) | ||
47 | *d++ = *s++; | ||
48 | |||
49 | return dest; | ||
50 | } | ||
51 | |||
42 | #define BOOT_HEAP_SIZE 0x10000 | 52 | #define BOOT_HEAP_SIZE 0x10000 |
43 | #include "../../../../lib/decompress_inflate.c" | 53 | #include "../../../../lib/decompress_inflate.c" |
44 | #endif | 54 | #endif |
diff --git a/arch/m32r/include/asm/ptrace.h b/arch/m32r/include/asm/ptrace.h index 527527584dd0..4313aa62b51b 100644 --- a/arch/m32r/include/asm/ptrace.h +++ b/arch/m32r/include/asm/ptrace.h | |||
@@ -113,9 +113,6 @@ struct pt_regs { | |||
113 | 113 | ||
114 | #define PTRACE_OLDSETOPTIONS 21 | 114 | #define PTRACE_OLDSETOPTIONS 21 |
115 | 115 | ||
116 | /* options set using PTRACE_SETOPTIONS */ | ||
117 | #define PTRACE_O_TRACESYSGOOD 0x00000001 | ||
118 | |||
119 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
120 | 117 | ||
121 | #include <asm/m32r.h> /* M32R_PSW_BSM, M32R_PSW_BPM */ | 118 | #include <asm/m32r.h> /* M32R_PSW_BSM, M32R_PSW_BPM */ |
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index 4c03361537aa..51f5e9aa4901 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c | |||
@@ -591,17 +591,16 @@ void user_enable_single_step(struct task_struct *child) | |||
591 | 591 | ||
592 | if (access_process_vm(child, pc&~3, &insn, sizeof(insn), 0) | 592 | if (access_process_vm(child, pc&~3, &insn, sizeof(insn), 0) |
593 | != sizeof(insn)) | 593 | != sizeof(insn)) |
594 | return -EIO; | 594 | return; |
595 | 595 | ||
596 | compute_next_pc(insn, pc, &next_pc, child); | 596 | compute_next_pc(insn, pc, &next_pc, child); |
597 | if (next_pc & 0x80000000) | 597 | if (next_pc & 0x80000000) |
598 | return -EIO; | 598 | return; |
599 | 599 | ||
600 | if (embed_debug_trap(child, next_pc)) | 600 | if (embed_debug_trap(child, next_pc)) |
601 | return -EIO; | 601 | return; |
602 | 602 | ||
603 | invalidate_cache(); | 603 | invalidate_cache(); |
604 | return 0; | ||
605 | } | 604 | } |
606 | 605 | ||
607 | void user_disable_single_step(struct task_struct *child) | 606 | void user_disable_single_step(struct task_struct *child) |
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index f3fb2c029cfc..d0f60b97bbc5 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c | |||
@@ -286,7 +286,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info, | |||
286 | case -ERESTARTNOINTR: | 286 | case -ERESTARTNOINTR: |
287 | regs->r0 = regs->orig_r0; | 287 | regs->r0 = regs->orig_r0; |
288 | if (prev_insn(regs) < 0) | 288 | if (prev_insn(regs) < 0) |
289 | return -EFAULT; | 289 | return; |
290 | } | 290 | } |
291 | } | 291 | } |
292 | 292 | ||
diff --git a/arch/mn10300/kernel/signal.c b/arch/mn10300/kernel/signal.c index 6ab0bee2a54f..4d584ae29ae1 100644 --- a/arch/mn10300/kernel/signal.c +++ b/arch/mn10300/kernel/signal.c | |||
@@ -459,10 +459,11 @@ static int handle_signal(int sig, | |||
459 | else | 459 | else |
460 | ret = setup_frame(sig, ka, oldset, regs); | 460 | ret = setup_frame(sig, ka, oldset, regs); |
461 | if (ret) | 461 | if (ret) |
462 | return; | 462 | return ret; |
463 | 463 | ||
464 | signal_delivered(sig, info, ka, regs, | 464 | signal_delivered(sig, info, ka, regs, |
465 | test_thread_flag(TIF_SINGLESTEP)); | 465 | test_thread_flag(TIF_SINGLESTEP)); |
466 | return 0; | ||
466 | } | 467 | } |
467 | 468 | ||
468 | /* | 469 | /* |
diff --git a/mm/bootmem.c b/mm/bootmem.c index 73096630cb35..bcb63ac48cc5 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c | |||
@@ -710,6 +710,10 @@ again: | |||
710 | if (ptr) | 710 | if (ptr) |
711 | return ptr; | 711 | return ptr; |
712 | 712 | ||
713 | /* do not panic in alloc_bootmem_bdata() */ | ||
714 | if (limit && goal + size > limit) | ||
715 | limit = 0; | ||
716 | |||
713 | ptr = alloc_bootmem_bdata(pgdat->bdata, size, align, goal, limit); | 717 | ptr = alloc_bootmem_bdata(pgdat->bdata, size, align, goal, limit); |
714 | if (ptr) | 718 | if (ptr) |
715 | return ptr; | 719 | return ptr; |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 661576324c7f..66e431060c05 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -2688,7 +2688,10 @@ static void kswapd_try_to_sleep(pg_data_t *pgdat, int order, int classzone_idx) | |||
2688 | * them before going back to sleep. | 2688 | * them before going back to sleep. |
2689 | */ | 2689 | */ |
2690 | set_pgdat_percpu_threshold(pgdat, calculate_normal_threshold); | 2690 | set_pgdat_percpu_threshold(pgdat, calculate_normal_threshold); |
2691 | schedule(); | 2691 | |
2692 | if (!kthread_should_stop()) | ||
2693 | schedule(); | ||
2694 | |||
2692 | set_pgdat_percpu_threshold(pgdat, calculate_pressure_threshold); | 2695 | set_pgdat_percpu_threshold(pgdat, calculate_pressure_threshold); |
2693 | } else { | 2696 | } else { |
2694 | if (remaining) | 2697 | if (remaining) |