summaryrefslogtreecommitdiff
path: root/arch/nios2
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-08-16 16:05:53 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-09-12 06:25:55 +0300
commit3aa4ed8040e1535d95c03cef8b52cf11bf0d8546 (patch)
treee63c37c557b8f1a5781c7970043d46b43c1590fd /arch/nios2
parent01088a603660dfa240ba3331f0a49a3e9797cad1 (diff)
downloadlinux-3aa4ed8040e1535d95c03cef8b52cf11bf0d8546.tar.xz
mm/hugetlb: make detecting shared pte more reliable
If the pagetables are shared, we shouldn't copy or take references. Since src could have unshared and dst shares with another vma, huge_pte_none() is thus used to determine whether dst_pte is shared. But this check isn't reliable. A shared pte could have pte none in pagetable in fact. The page count of ptep page should be checked here in order to reliably determine whether pte is shared. [lukas.bulwahn@gmail.com: remove unused local variable dst_entry in copy_hugetlb_page_range()] Link: https://lkml.kernel.org/r/20220822082525.26071-1-lukas.bulwahn@gmail.com Link: https://lkml.kernel.org/r/20220816130553.31406-7-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Cc: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/nios2')
0 files changed, 0 insertions, 0 deletions