Re: bug: data corruption introduced by commit 83d116c53058 ("mm: fix double page fault on arm64 if PTE_AF is cleared")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux