diff options
| author | Andrea Arcangeli <[email protected]> | 2016-02-05 23:36:13 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2016-02-06 02:10:40 +0000 |
| commit | acf128d048c76aeaa99646bce3488d73be215f70 (patch) | |
| tree | 73218b1077b2b1b8fed94fe8aca94326a6843b4f /lib/dump_stack.c | |
| parent | m32r: fix build failure due to SMP and MMU (diff) | |
| download | kernel-acf128d048c76aeaa99646bce3488d73be215f70.tar.gz kernel-acf128d048c76aeaa99646bce3488d73be215f70.zip | |
mm: validate_mm browse_rb SMP race condition
The mmap_sem for reading in validate_mm called from expand_stack is not
enough to prevent the argumented rbtree rb_subtree_gap information to
change from under us because expand_stack may be running from other
threads concurrently which will hold the mmap_sem for reading too.
The argumented rbtree is updated with vma_gap_update under the
page_table_lock so use it in browse_rb() too to avoid false positives.
Signed-off-by: Andrea Arcangeli <[email protected]>
Reported-by: Dmitry Vyukov <[email protected]>
Tested-by: Dmitry Vyukov <[email protected]>
Cc: Konstantin Khlebnikov <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/dump_stack.c')
0 files changed, 0 insertions, 0 deletions
