summaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorAndi Kleen2014-08-07 01:06:49 +0200
committerLinus Torvalds2014-08-07 03:01:19 +0200
commitf37d4298aa7f8b74395aa13c728677e2ed86fdaf (patch)
treeddbf92044a7e44a2840ba2a4f985123dfadfd410 /mm/hugetlb.c
parentmm,hugetlb: simplify error handling in hugetlb_cow() (diff)
downloadkernel-qcow2-linux-f37d4298aa7f8b74395aa13c728677e2ed86fdaf.tar.gz
kernel-qcow2-linux-f37d4298aa7f8b74395aa13c728677e2ed86fdaf.tar.xz
kernel-qcow2-linux-f37d4298aa7f8b74395aa13c728677e2ed86fdaf.zip
hwpoison: fix race with changing page during offlining
When a hwpoison page is locked it could change state due to parallel modifications. The original compound page can be torn down and then this 4k page becomes part of a differently-size compound page is is a standalone regular page. Check after the lock if the page is still the same compound page. We could go back, grab the new head page and try again but it should be quite rare, so I thought this was safest. A retry loop would be more difficult to test and may have more side effects. The hwpoison code by design only tries to handle cases that are reasonably common in workloads, as visible in page-flags. I'm not really that concerned about handling this (likely rare case), just not crashing on it. Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb.c')
0 files changed, 0 insertions, 0 deletions