summaryrefslogtreecommitdiffstats
path: root/mm/filemap_xip.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-02-04 10:51:54 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-02-04 10:51:54 -0800
commit82bdc843c2be0ce199e8e247dfb2a17248cbd6c4 (patch)
treef04e4c0935dd9e3f05741bf812229b36b18683cd /mm/filemap_xip.c
parent71b1b20b8aea6ba4a1a15736409f1261d8dfe1da (diff)
parent0bf380bc70ecba68cb4d74dc656cc2fa8c4d801a (diff)
downloadlinux-stable-82bdc843c2be0ce199e8e247dfb2a17248cbd6c4.tar.gz
linux-stable-82bdc843c2be0ce199e8e247dfb2a17248cbd6c4.tar.bz2
linux-stable-82bdc843c2be0ce199e8e247dfb2a17248cbd6c4.zip
Merge branch 'akpm'
* akpm: mm: compaction: check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during isolation for migration readahead: fix pipeline break caused by block plug kprobes: fix a memory leak in function pre_handler_kretprobe() drivers/tty/vt/vt_ioctl.c: fix KDFONTOP 32bit compatibility layer lkdtm: avoid calling lkdtm_do_action() with spinlock held mm/filemap_xip.c: fix race condition in xip_file_fault() mm/memcontrol.c: fix warning with CONFIG_NUMA=n avr32: select generic atomic64_t support mm: postpone migrated page mapping reset xtensa: fix memscan() MAINTAINERS: update lguest F: patterns MAINTAINERS: remove staging sections MAINTAINERS: remove iMX5 section MAINTAINERS: update partitions block F: patterns
Diffstat (limited to 'mm/filemap_xip.c')
-rw-r--r--mm/filemap_xip.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c
index f91b2f687343..a4eb31132229 100644
--- a/mm/filemap_xip.c
+++ b/mm/filemap_xip.c
@@ -263,7 +263,12 @@ found:
xip_pfn);
if (err == -ENOMEM)
return VM_FAULT_OOM;
- BUG_ON(err);
+ /*
+ * err == -EBUSY is fine, we've raced against another thread
+ * that faulted-in the same page
+ */
+ if (err != -EBUSY)
+ BUG_ON(err);
return VM_FAULT_NOPAGE;
} else {
int err, ret = VM_FAULT_OOM;