OSDN Git Service

mm: hugetlb: fix type of delta parameter and related local variables in gather_surplu...
authorLiu Xiang <liu.xiang@zlingsmart.com>
Tue, 15 Dec 2020 03:12:05 +0000 (19:12 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2020 20:13:44 +0000 (12:13 -0800)
commit0a4f3d1bb91cac4efdd780373638b6a1a4c24c51
treece7178171289186ab535a0043e2e299e3eaf7f85
parent336e6b53d99ae32ee35c1a7d3d0f99db22e1ff51
mm: hugetlb: fix type of delta parameter and related local variables in gather_surplus_pages()

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.com
Reported-by: Ma Chenggong <ma.chenggong@zlingsmart.com>
Signed-off-by: Liu Xiang <liu.xiang@zlingsmart.com>
Signed-off-by: Pan Jiagen <pan.jiagen@zlingsmart.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Liu Xiang <liuxiang_1999@126.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c