Re: [PATCH] mm: mempolicy: fix potential pte_unmap_unlock pte error

2020-10-19 Thread Michal Hocko
On Mon 19-10-20 12:50:34, Oscar Salvador wrote: > On Mon, Oct 19, 2020 at 03:48:53AM -0400, Shijie Luo wrote: > > When flags in queue_pages_pte_range don't have MPOL_MF_MOVE or > > MPOL_MF_MOVE_ALL > > bits, code breaks and passing origin pte - 1 to pte_unmap_unlock seems like > > not a good

Re: [PATCH] mm: mempolicy: fix potential pte_unmap_unlock pte error

2020-10-19 Thread Oscar Salvador
On Mon, Oct 19, 2020 at 03:48:53AM -0400, Shijie Luo wrote: > When flags in queue_pages_pte_range don't have MPOL_MF_MOVE or > MPOL_MF_MOVE_ALL > bits, code breaks and passing origin pte - 1 to pte_unmap_unlock seems like > not a good idea. I think the above is already explained below? >

[PATCH] mm: mempolicy: fix potential pte_unmap_unlock pte error

2020-10-19 Thread Shijie Luo
When flags in queue_pages_pte_range don't have MPOL_MF_MOVE or MPOL_MF_MOVE_ALL bits, code breaks and passing origin pte - 1 to pte_unmap_unlock seems like not a good idea. queue_pages_pte_range can run in MPOL_MF_MOVE_ALL mode which doesn't migrate misplaced pages but returns with EIO when