mm: hugetlb: fix type of delta parameter and related local variables in gather_surplus_pages()
mainline inclusion from mainline-v5.11-rc1 commit 0a4f3d1b category: bugfix bugzilla: 108349 https://gitee.com/openeuler/kernel/issues/I4DDEL Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0a4f3d1bb91cac4efdd780373638b6a1a4c24c51 ----------------------------------------------- On 64-bit machine, delta variable in hugetlb_acct_memory() may be larger than 0xffffffff, but gather_surplus_pages() can only use the low 32-bit value now. So we need to fix type of delta parameter and related local variables in gather_surplus_pages(). Link: https://lkml.kernel.org/r/1605793733-3573-1-git-send-email-liu.xiang@zlingsmart.comReported-by: NMa Chenggong <ma.chenggong@zlingsmart.com> Signed-off-by: NLiu Xiang <liu.xiang@zlingsmart.com> Signed-off-by: NPan Jiagen <pan.jiagen@zlingsmart.com> Reviewed-by: NMike Kravetz <mike.kravetz@oracle.com> Cc: Liu Xiang <liuxiang_1999@126.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NTong Tiangen <tongtiangen@huawei.com> Reviewed-by: NChen Wandun <chenwandun@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录