diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-17 19:11:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-17 19:11:09 -0400 |
commit | 1ce6ec91a8528f80442eee7157be1b016248a883 (patch) | |
tree | 7a7f6ecf83016a4b9ff3bd357303e0e6b4f585a5 | |
parent | 96d8683483b7eb194609edd1afe9143a0467b7d3 (diff) | |
parent | b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f (diff) |
Merge branch 'akpm' (fixes from Andrew)
Pull misc fixes from Andrew Morton:
"Ten fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
kernel/signal.c: stop info leak via the tkill and the tgkill syscalls
mm/vmscan: fix error return in kswapd_run()
hfsplus: fix potential overflow in hfsplus_file_truncate()
avr32: fix build error in atstk1006_defconfig
hugetlbfs: add swap entry check in follow_hugetlb_page()
fs/binfmt_elf.c: fix hugetlb memory check in vma_dump_size()
hugetlbfs: stop setting VM_DONTDUMP in initializing vma(VM_HUGETLB)
checkpatch: fix stringification macro defect
drivers/video/mmp/core.c: fix use-after-free bug
thinkpad-acpi: kill hotkey_thread_mutex
-rw-r--r-- | arch/avr32/include/asm/io.h | 4 | ||||
-rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 10 | ||||
-rw-r--r-- | drivers/video/mmp/core.c | 2 | ||||
-rw-r--r-- | fs/binfmt_elf.c | 1 | ||||
-rw-r--r-- | fs/hfsplus/extents.c | 2 | ||||
-rw-r--r-- | fs/hugetlbfs/inode.c | 2 | ||||
-rw-r--r-- | kernel/signal.c | 2 | ||||
-rw-r--r-- | mm/hugetlb.c | 12 | ||||
-rw-r--r-- | mm/vmscan.c | 2 | ||||
-rwxr-xr-x | scripts/checkpatch.pl | 1 |
10 files changed, 21 insertions, 17 deletions
diff --git a/arch/avr32/include/asm/io.h b/arch/avr32/include/asm/io.h index cf60d0a9f176..fc6483f83ccc 100644 --- a/arch/avr32/include/asm/io.h +++ b/arch/avr32/include/asm/io.h | |||
@@ -165,6 +165,10 @@ BUILDIO_IOPORT(l, u32) | |||
165 | #define readw_be __raw_readw | 165 | #define readw_be __raw_readw |
166 | #define readl_be __raw_readl | 166 | #define readl_be __raw_readl |
167 | 167 | ||
168 | #define writeb_relaxed writeb | ||
169 | #define writew_relaxed writew | ||
170 | #define writel_relaxed writel | ||
171 | |||
168 | #define writeb_be __raw_writeb | 172 | #define writeb_be __raw_writeb |
169 | #define writew_be __raw_writew | 173 | #define writew_be __raw_writew |
170 | #define writel_be __raw_writel | 174 | #define writel_be __raw_writel |
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 9a907567f41e..edec135b1685 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
@@ -1964,9 +1964,6 @@ struct tp_nvram_state { | |||
1964 | /* kthread for the hotkey poller */ | 1964 | /* kthread for the hotkey poller */ |
1965 | static struct task_struct *tpacpi_hotkey_task; | 1965 | static struct task_struct *tpacpi_hotkey_task; |
1966 | 1966 | ||
1967 | /* Acquired while the poller kthread is running, use to sync start/stop */ | ||
1968 | static struct mutex hotkey_thread_mutex; | ||
1969 | |||
1970 | /* | 1967 | /* |
1971 | * Acquire mutex to write poller control variables as an | 1968 | * Acquire mutex to write poller control variables as an |
1972 | * atomic block. | 1969 | * atomic block. |
@@ -2462,8 +2459,6 @@ static int hotkey_kthread(void *data) | |||
2462 | unsigned int poll_freq; | 2459 | unsigned int poll_freq; |
2463 | bool was_frozen; | 2460 | bool was_frozen; |
2464 | 2461 | ||
2465 | mutex_lock(&hotkey_thread_mutex); | ||
2466 | |||
2467 | if (tpacpi_lifecycle == TPACPI_LIFE_EXITING) | 2462 | if (tpacpi_lifecycle == TPACPI_LIFE_EXITING) |
2468 | goto exit; | 2463 | goto exit; |
2469 | 2464 | ||
@@ -2523,7 +2518,6 @@ static int hotkey_kthread(void *data) | |||
2523 | } | 2518 | } |
2524 | 2519 | ||
2525 | exit: | 2520 | exit: |
2526 | mutex_unlock(&hotkey_thread_mutex); | ||
2527 | return 0; | 2521 | return 0; |
2528 | } | 2522 | } |
2529 | 2523 | ||
@@ -2533,9 +2527,6 @@ static void hotkey_poll_stop_sync(void) | |||
2533 | if (tpacpi_hotkey_task) { | 2527 | if (tpacpi_hotkey_task) { |
2534 | kthread_stop(tpacpi_hotkey_task); | 2528 | kthread_stop(tpacpi_hotkey_task); |
2535 | tpacpi_hotkey_task = NULL; | 2529 | tpacpi_hotkey_task = NULL; |
2536 | mutex_lock(&hotkey_thread_mutex); | ||
2537 | /* at this point, the thread did exit */ | ||
2538 | mutex_unlock(&hotkey_thread_mutex); | ||
2539 | } | 2530 | } |
2540 | } | 2531 | } |
2541 | 2532 | ||
@@ -3234,7 +3225,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
3234 | mutex_init(&hotkey_mutex); | 3225 | mutex_init(&hotkey_mutex); |
3235 | 3226 | ||
3236 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL | 3227 | #ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL |
3237 | mutex_init(&hotkey_thread_mutex); | ||
3238 | mutex_init(&hotkey_thread_data_mutex); | 3228 | mutex_init(&hotkey_thread_data_mutex); |
3239 | #endif | 3229 | #endif |
3240 | 3230 | ||
diff --git a/drivers/video/mmp/core.c b/drivers/video/mmp/core.c index 9ed83419038b..84de2632857a 100644 --- a/drivers/video/mmp/core.c +++ b/drivers/video/mmp/core.c | |||
@@ -252,7 +252,5 @@ void mmp_unregister_path(struct mmp_path *path) | |||
252 | 252 | ||
253 | kfree(path); | 253 | kfree(path); |
254 | mutex_unlock(&disp_lock); | 254 | mutex_unlock(&disp_lock); |
255 | |||
256 | dev_info(path->dev, "de-register %s\n", path->name); | ||
257 | } | 255 | } |
258 | EXPORT_SYMBOL_GPL(mmp_unregister_path); | 256 | EXPORT_SYMBOL_GPL(mmp_unregister_path); |
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 3939829f6c5c..86af964c2425 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -1137,6 +1137,7 @@ static unsigned long vma_dump_size(struct vm_area_struct *vma, | |||
1137 | goto whole; | 1137 | goto whole; |
1138 | if (!(vma->vm_flags & VM_SHARED) && FILTER(HUGETLB_PRIVATE)) | 1138 | if (!(vma->vm_flags & VM_SHARED) && FILTER(HUGETLB_PRIVATE)) |
1139 | goto whole; | 1139 | goto whole; |
1140 | return 0; | ||
1140 | } | 1141 | } |
1141 | 1142 | ||
1142 | /* Do not dump I/O mapped devices or special mappings */ | 1143 | /* Do not dump I/O mapped devices or special mappings */ |
diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c index a94f0f779d5e..fe0a76213d9e 100644 --- a/fs/hfsplus/extents.c +++ b/fs/hfsplus/extents.c | |||
@@ -533,7 +533,7 @@ void hfsplus_file_truncate(struct inode *inode) | |||
533 | struct address_space *mapping = inode->i_mapping; | 533 | struct address_space *mapping = inode->i_mapping; |
534 | struct page *page; | 534 | struct page *page; |
535 | void *fsdata; | 535 | void *fsdata; |
536 | u32 size = inode->i_size; | 536 | loff_t size = inode->i_size; |
537 | 537 | ||
538 | res = pagecache_write_begin(NULL, mapping, size, 0, | 538 | res = pagecache_write_begin(NULL, mapping, size, 0, |
539 | AOP_FLAG_UNINTERRUPTIBLE, | 539 | AOP_FLAG_UNINTERRUPTIBLE, |
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 84e3d856e91d..523464e62849 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -110,7 +110,7 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) | |||
110 | * way when do_mmap_pgoff unwinds (may be important on powerpc | 110 | * way when do_mmap_pgoff unwinds (may be important on powerpc |
111 | * and ia64). | 111 | * and ia64). |
112 | */ | 112 | */ |
113 | vma->vm_flags |= VM_HUGETLB | VM_DONTEXPAND | VM_DONTDUMP; | 113 | vma->vm_flags |= VM_HUGETLB | VM_DONTEXPAND; |
114 | vma->vm_ops = &hugetlb_vm_ops; | 114 | vma->vm_ops = &hugetlb_vm_ops; |
115 | 115 | ||
116 | if (vma->vm_pgoff & (~huge_page_mask(h) >> PAGE_SHIFT)) | 116 | if (vma->vm_pgoff & (~huge_page_mask(h) >> PAGE_SHIFT)) |
diff --git a/kernel/signal.c b/kernel/signal.c index dd72567767d9..598dc06be421 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -2948,7 +2948,7 @@ do_send_specific(pid_t tgid, pid_t pid, int sig, struct siginfo *info) | |||
2948 | 2948 | ||
2949 | static int do_tkill(pid_t tgid, pid_t pid, int sig) | 2949 | static int do_tkill(pid_t tgid, pid_t pid, int sig) |
2950 | { | 2950 | { |
2951 | struct siginfo info; | 2951 | struct siginfo info = {}; |
2952 | 2952 | ||
2953 | info.si_signo = sig; | 2953 | info.si_signo = sig; |
2954 | info.si_errno = 0; | 2954 | info.si_errno = 0; |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index ca9a7c6d7e97..1a12f5b9a0ab 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -2961,7 +2961,17 @@ long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2961 | break; | 2961 | break; |
2962 | } | 2962 | } |
2963 | 2963 | ||
2964 | if (absent || | 2964 | /* |
2965 | * We need call hugetlb_fault for both hugepages under migration | ||
2966 | * (in which case hugetlb_fault waits for the migration,) and | ||
2967 | * hwpoisoned hugepages (in which case we need to prevent the | ||
2968 | * caller from accessing to them.) In order to do this, we use | ||
2969 | * here is_swap_pte instead of is_hugetlb_entry_migration and | ||
2970 | * is_hugetlb_entry_hwpoisoned. This is because it simply covers | ||
2971 | * both cases, and because we can't follow correct pages | ||
2972 | * directly from any kind of swap entries. | ||
2973 | */ | ||
2974 | if (absent || is_swap_pte(huge_ptep_get(pte)) || | ||
2965 | ((flags & FOLL_WRITE) && !pte_write(huge_ptep_get(pte)))) { | 2975 | ((flags & FOLL_WRITE) && !pte_write(huge_ptep_get(pte)))) { |
2966 | int ret; | 2976 | int ret; |
2967 | 2977 | ||
diff --git a/mm/vmscan.c b/mm/vmscan.c index 88c5fed8b9a4..669fba39be1a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -3188,9 +3188,9 @@ int kswapd_run(int nid) | |||
3188 | if (IS_ERR(pgdat->kswapd)) { | 3188 | if (IS_ERR(pgdat->kswapd)) { |
3189 | /* failure at boot is fatal */ | 3189 | /* failure at boot is fatal */ |
3190 | BUG_ON(system_state == SYSTEM_BOOTING); | 3190 | BUG_ON(system_state == SYSTEM_BOOTING); |
3191 | pgdat->kswapd = NULL; | ||
3192 | pr_err("Failed to start kswapd on node %d\n", nid); | 3191 | pr_err("Failed to start kswapd on node %d\n", nid); |
3193 | ret = PTR_ERR(pgdat->kswapd); | 3192 | ret = PTR_ERR(pgdat->kswapd); |
3193 | pgdat->kswapd = NULL; | ||
3194 | } | 3194 | } |
3195 | return ret; | 3195 | return ret; |
3196 | } | 3196 | } |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b28cc384a5bc..4de4bc48493b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -3016,6 +3016,7 @@ sub process { | |||
3016 | $dstat !~ /^'X'$/ && # character constants | 3016 | $dstat !~ /^'X'$/ && # character constants |
3017 | $dstat !~ /$exceptions/ && | 3017 | $dstat !~ /$exceptions/ && |
3018 | $dstat !~ /^\.$Ident\s*=/ && # .foo = | 3018 | $dstat !~ /^\.$Ident\s*=/ && # .foo = |
3019 | $dstat !~ /^(?:\#\s*$Ident|\#\s*$Constant)\s*$/ && # stringification #foo | ||
3019 | $dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ && # do {...} while (...); // do {...} while (...) | 3020 | $dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ && # do {...} while (...); // do {...} while (...) |
3020 | $dstat !~ /^for\s*$Constant$/ && # for (...) | 3021 | $dstat !~ /^for\s*$Constant$/ && # for (...) |
3021 | $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() | 3022 | $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() |