summaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
authorMike Kravetz <mike.kravetz@oracle.com>2015-06-24 16:57:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-24 17:49:44 -0700
commit33039678c8da8133e30ea3250d10ae14701dae2b (patch)
treef4193b8b309d314fa2c09fca917efc3e685f0f74 /mm/oom_kill.c
parentcf3ad20bfeadda693e408d85684790714fc29b08 (diff)
downloadop-kernel-dev-33039678c8da8133e30ea3250d10ae14701dae2b.zip
op-kernel-dev-33039678c8da8133e30ea3250d10ae14701dae2b.tar.gz
mm/hugetlb: handle races in alloc_huge_page and hugetlb_reserve_pages
alloc_huge_page and hugetlb_reserve_pages use region_chg to calculate the number of pages which will be added to the reserve map. Subpool and global reserve counts are adjusted based on the output of region_chg. Before the pages are actually added to the reserve map, these routines could race and add fewer pages than expected. If this happens, the subpool and global reserve counts are not correct. Compare the number of pages actually added (region_add) to those expected to added (region_chg). If fewer pages are actually added, this indicates a race and adjust counters accordingly. Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> Cc: David Rientjes <rientjes@google.com> Cc: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/oom_kill.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud