This repository was archived by the owner on Jun 1, 2022. It is now read-only.
fix some races#53
Merged
Merged
Conversation
ThreadSanitizer: data-race in __get_user_pages Read of size 8 by thread T455 (K2703, CPU0): [< inlined >] faultin_page mm/gup.c:299 [<ffffffff8120e808>] __get_user_pages+0x408/0x8a0 mm/gup.c:477 [<ffffffff8120f323>] populate_vma_page_range+0x93/0xb0 mm/gup.c:873 [<ffffffff8120f433>] __mm_populate+0xf3/0x1a0 mm/gup.c:923 [< inlined >] mm_populate include/linux/mm.h:1894 [< inlined >] SYSC_mlockall mm/mlock.c:709 [<ffffffff81219d6e>] SyS_mlockall+0x1ee/0x230 mm/mlock.c:683 [<ffffffff81eeb7ae>] entry_SYSCALL_64_fastpath+0x12/0x71 arch/x86/entry/entry_64.S:186 Previous write of size 8 by thread T460 (K2708, CPU3): [< inlined >] faultin_page mm/gup.c:299 [<ffffffff8120e82a>] __get_user_pages+0x42a/0x8a0 mm/gup.c:477 [< inlined >] __get_user_pages_locked mm/gup.c:608 [< inlined >] __get_user_pages_unlocked mm/gup.c:723 [<ffffffff8120f024>] get_user_pages_unlocked+0x164/0x200 mm/gup.c:752 [< inlined >] process_vm_rw_single_vec mm/process_vm_access.c:102 [<ffffffff8122c717>] process_vm_rw_core.isra.1+0x297/0x5b0 mm/process_vm_access.c:210 [<ffffffff8122cba4>] process_vm_rw+0x174/0x180 mm/process_vm_access.c:277 [< inlined >] SYSC_process_vm_writev mm/process_vm_access.c:299 [<ffffffff8122cdeb>] SyS_process_vm_writev+0x4b/0x70 mm/process_vm_access.c:294 [<ffffffff81eeb7ae>] entry_SYSCALL_64_fastpath+0x12/0x71 arch/x86/entry/entry_64.S:186
e1000_clean_tx_irq hands off buffer to e1000_xmit_frame by setting next_to_clean, but there is no smp_load_acquire/store_release, so there are races on buffers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.