]> git.baikalelectronics.ru Git - kernel.git/commit
mm/migrate: fix NR_ISOLATED corruption on 64-bit
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Thu, 29 Jul 2021 21:53:47 +0000 (14:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 30 Jul 2021 17:14:39 +0000 (10:14 -0700)
commitcf99ab70cb65b6b25aaf7dcc05803a3bfb413f07
treee410f1dceac3d18fbdacae4dca206340a166b15b
parentc771a5f9336c6a8c9dfa1af8cb83d5dfcfc960f9
mm/migrate: fix NR_ISOLATED corruption on 64-bit

Similar to commit 6fc554c30470 ("mm/vmscan: fix NR_ISOLATED_FILE
corruption on 64-bit") avoid using unsigned int for nr_pages.  With
unsigned int type the large unsigned int converts to a large positive
signed long.

Symptoms include CMA allocations hanging forever due to
alloc_contig_range->...->isolate_migratepages_block waiting forever in
"while (unlikely(too_many_isolated(pgdat)))".

Link: https://lkml.kernel.org/r/20210728042531.359409-1-aneesh.kumar@linux.ibm.com
Fixes: d0dfedaecda7 ("mm: migrate: account THP NUMA migration counters correctly")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Reported-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c