Hi, Kirill, "Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx> writes: > My guess is that MADV_DONTNEED get the page unmapped under you and > __copy_from_user_inatomic() sees empty PTE instead of the populated PTE it > expects. > > Below is my completely untested attempt to fix it. > > It is going to hurt perfomance in common case, but it should be good > enough to test my idea. Yes, that resolves the issue for me. > The real solution would be to retry __copy_from_user_inatomic() under ptl > if the first attempt fails. I expect it to be ugly. So long as it's correct. :) Thanks! Jeff