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

2020-10-19 Thread Shijie Luo
On 2020/10/19 14:59, Michal Hocko wrote: On Fri 16-10-20 22:11:51, Shijie Luo wrote: When flags 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. This would really benefit from some improvements. It is

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

2020-10-19 Thread Michal Hocko
On Fri 16-10-20 22:11:51, Shijie Luo wrote: > When flags 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. This would really benefit from some improvements. It is preferable to provide a user visibile effect

[PATCH V2] mm: fix potential pte_unmap_unlock pte error

2020-10-16 Thread Shijie Luo
When flags 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. Signed-off-by: Shijie Luo Signed-off-by: Michal Hocko Signed-off-by: Miaohe Lin --- mm/mempolicy.c | 6 +++--- 1 file changed, 3 insertions(+),