* [merged] mm-hugetlb-fix-type-of-delta-parameter-and-related-local-variables-in-gather_surplus_pages.patch removed from -mm tree
@ 2020-12-15 23:22 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-12-15 23:22 UTC (permalink / raw)
To: liu.xiang, liuxiang_1999, ma.chenggong, mike.kravetz, mm-commits,
pan.jiagen
The patch titled
Subject: mm: hugetlb: fix type of delta parameter and related local variables in gather_surplus_pages()
has been removed from the -mm tree. Its filename was
mm-hugetlb-fix-type-of-delta-parameter-and-related-local-variables-in-gather_surplus_pages.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Liu Xiang <liu.xiang@zlingsmart.com>
Subject: 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>
---
mm/hugetlb.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/mm/hugetlb.c~mm-hugetlb-fix-type-of-delta-parameter-and-related-local-variables-in-gather_surplus_pages
+++ a/mm/hugetlb.c
@@ -1944,13 +1944,14 @@ struct page *alloc_huge_page_vma(struct
* Increase the hugetlb pool such that it can accommodate a reservation
* of size 'delta'.
*/
-static int gather_surplus_pages(struct hstate *h, int delta)
+static int gather_surplus_pages(struct hstate *h, long delta)
__must_hold(&hugetlb_lock)
{
struct list_head surplus_list;
struct page *page, *tmp;
- int ret, i;
- int needed, allocated;
+ int ret;
+ long i;
+ long needed, allocated;
bool alloc_ok = true;
needed = (h->resv_huge_pages + delta) - h->free_huge_pages;
_
Patches currently in -mm which might be from liu.xiang@zlingsmart.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-15 23:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 23:22 [merged] mm-hugetlb-fix-type-of-delta-parameter-and-related-local-variables-in-gather_surplus_pages.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.