]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mm, hugetlb: close race when setting PageTail for gigantic pages
authorDavid Rientjes <rientjes@google.com>
Thu, 12 Mar 2015 23:25:54 +0000 (16:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Mar 2015 01:46:07 +0000 (18:46 -0700)
commit44fc80573cc760a7154f41fd0a958ee10eba1a81
tree2d3fd80fa0bc653b2be577e38ef38217727acd22
parente009d5dc0a94a7133e5f1c083732d760bfd038e6
mm, hugetlb: close race when setting PageTail for gigantic pages

Now that gigantic pages are dynamically allocatable, care must be taken to
ensure that p->first_page is valid before setting PageTail.

If this isn't done, then it is possible to race and have compound_head()
return NULL.

Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c