diff options
author | Carsten Otte <[email protected]> | 2012-02-03 15:37:14 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2012-02-03 16:16:41 -0800 |
commit | 99f02ef1f18631eb0a4e0ea0a3d56878dbcb4b90 (patch) | |
tree | 1d08f77be2c89e3ed6a92caebbcdf02f85ba1447 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 82b3f2a7171731cce62f25058d25afb91a14710c (diff) |
mm/filemap_xip.c: fix race condition in xip_file_fault()
Fix a race condition that shows in conjunction with xip_file_fault() when
two threads of the same user process fault on the same memory page.
In this case, the race winner will install the page table entry and the
unlucky loser will cause an oops: xip_file_fault calls vm_insert_pfn (via
vm_insert_mixed) which drops out at this check:
retval = -EBUSY;
if (!pte_none(*pte))
goto out_unlock;
The resulting -EBUSY return value will trigger a BUG_ON() in
xip_file_fault.
This fix simply considers the fault as fixed in this case, because the
race winner has successfully installed the pte.
[[email protected]: use conventional (and consistent) comment layout]
Reported-by: David Sadler <[email protected]>
Signed-off-by: Carsten Otte <[email protected]>
Reported-by: Louis Alex Eisner <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions