Commit 8c86437
selftests/mm: fix ARM related issue with fork after pthread_create
Following issue was observed while running the uffd-unit-tests selftest
on ARM devices. On x86_64 no issues were detected:
pthread_create followed by fork caused deadlock in certain cases wherein
fork required some work to be completed by the created thread. Used
synchronization to ensure that created thread's start function has started
before invoking fork.
[[email protected]: refactored to use atomic_bool]
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 760aee0 ("selftests/mm: add tests for RO pinning vs fork()")
Signed-off-by: Lokesh Gidra <[email protected]>
Signed-off-by: Edward Liaw <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent 549aa96 commit 8c86437
File tree
3 files changed
+15
-0
lines changed- tools/testing/selftests/mm
3 files changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
518 | 519 | | |
519 | 520 | | |
520 | 521 | | |
| 522 | + | |
| 523 | + | |
521 | 524 | | |
522 | 525 | | |
523 | 526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| 107 | + | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
| 778 | + | |
| 779 | + | |
778 | 780 | | |
779 | 781 | | |
780 | 782 | | |
| |||
790 | 792 | | |
791 | 793 | | |
792 | 794 | | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
793 | 798 | | |
794 | 799 | | |
795 | 800 | | |
| |||
829 | 834 | | |
830 | 835 | | |
831 | 836 | | |
| 837 | + | |
| 838 | + | |
832 | 839 | | |
833 | 840 | | |
834 | 841 | | |
| |||
838 | 845 | | |
839 | 846 | | |
840 | 847 | | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
841 | 851 | | |
842 | 852 | | |
843 | 853 | | |
| |||
0 commit comments