diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-12 21:22:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-12 21:22:10 -0500 |
commit | 8d2763770c34e8ed771f0be86760eb4485febc05 (patch) | |
tree | 38ca3d44f84b8f575f3378c6be525e559bd314c1 /fs | |
parent | 54fb723cc48db2fde964fb9bb0eaaccf2cf31a9f (diff) | |
parent | 1f14c1ac19aa45118054b6d5425873c5c7fc23a1 (diff) |
Merge branch 'akpm' (fixes from Andrew)
Merge patches from Andrew Morton:
"13 fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
mm: memcg: do not allow task about to OOM kill to bypass the limit
mm: memcg: fix race condition between memcg teardown and swapin
thp: move preallocated PTE page table on move_huge_pmd()
mfd/rtc: s5m: fix register updating by adding regmap for RTC
rtc: s5m: enable IRQ wake during suspend
rtc: s5m: limit endless loop waiting for register update
rtc: s5m: fix unsuccesful IRQ request during probe
drivers/rtc/rtc-s5m.c: fix info->rtc assignment
include/linux/kernel.h: make might_fault() a nop for !MMU
drivers/rtc/rtc-at91rm9200.c: correct alarm over day/month wrap
procfs: also fix proc_reg_get_unmapped_area() for !MMU case
mm: memcg: do not declare OOM from __GFP_NOFAIL allocations
include/linux/hugetlb.h: make isolate_huge_page() an inline
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/inode.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 28955d4b7218..124fc43c7090 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -292,16 +292,20 @@ proc_reg_get_unmapped_area(struct file *file, unsigned long orig_addr, | |||
292 | { | 292 | { |
293 | struct proc_dir_entry *pde = PDE(file_inode(file)); | 293 | struct proc_dir_entry *pde = PDE(file_inode(file)); |
294 | unsigned long rv = -EIO; | 294 | unsigned long rv = -EIO; |
295 | unsigned long (*get_area)(struct file *, unsigned long, unsigned long, | 295 | |
296 | unsigned long, unsigned long) = NULL; | ||
297 | if (use_pde(pde)) { | 296 | if (use_pde(pde)) { |
297 | typeof(proc_reg_get_unmapped_area) *get_area; | ||
298 | |||
299 | get_area = pde->proc_fops->get_unmapped_area; | ||
298 | #ifdef CONFIG_MMU | 300 | #ifdef CONFIG_MMU |
299 | get_area = current->mm->get_unmapped_area; | 301 | if (!get_area) |
302 | get_area = current->mm->get_unmapped_area; | ||
300 | #endif | 303 | #endif |
301 | if (pde->proc_fops->get_unmapped_area) | 304 | |
302 | get_area = pde->proc_fops->get_unmapped_area; | ||
303 | if (get_area) | 305 | if (get_area) |
304 | rv = get_area(file, orig_addr, len, pgoff, flags); | 306 | rv = get_area(file, orig_addr, len, pgoff, flags); |
307 | else | ||
308 | rv = orig_addr; | ||
305 | unuse_pde(pde); | 309 | unuse_pde(pde); |
306 | } | 310 | } |
307 | return rv; | 311 | return rv; |