diff options
author | Aneesh Kumar K.V <[email protected]> | 2018-10-26 15:09:01 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2018-10-26 16:26:35 -0700 |
commit | ff09d7ec9786be4ad7589aa987d7dc66e2dd9160 (patch) | |
tree | 434364aec7ce46a9727f07011121bac423e9205e /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | cc4b8c794f476076c9ce19f43eb4d98dc4b5e155 (diff) |
mm/memory.c: recheck page table entry with page table lock held
We clear the pte temporarily during read/modify/write update of the pte.
If we take a page fault while the pte is cleared, the application can get
SIGBUS. One such case is with remap_pfn_range without a backing
vm_ops->fault callback. do_fault will return SIGBUS in that case.
cpu 0 cpu1
mprotect()
ptep_modify_prot_start()/pte cleared.
.
. page fault.
.
.
prep_modify_prot_commit()
Fix this by taking page table lock and rechecking for pte_none.
[[email protected]: fix crash observed with syzkaller run]
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Aneesh Kumar K.V <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Cc: Willem de Bruijn <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Ido Schimmel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions