diff options
author | Mike Kravetz <[email protected]> | 2022-04-14 19:13:52 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2022-04-15 14:49:55 -0700 |
commit | 5a317412ef884763fdf7aa17f9f3636959d11d8f (patch) | |
tree | 28d3f08cd0e8a61139d2cf79fc67d2bc6d22851f /lib/test-string_helpers.c | |
parent | 31ca72fa7540bb654b55c56adaf99305847376e0 (diff) |
hugetlb: do not demote poisoned hugetlb pages
It is possible for poisoned hugetlb pages to reside on the free lists.
The huge page allocation routines which dequeue entries from the free
lists make a point of avoiding poisoned pages. There is no such check
and avoidance in the demote code path.
If a hugetlb page on the is on a free list, poison will only be set in
the head page rather then the page with the actual error. If such a
page is demoted, then the poison flag may follow the wrong page. A page
without error could have poison set, and a page with poison could not
have the flag set.
Check for poison before attempting to demote a hugetlb page. Also,
return -EBUSY to the caller if only poisoned pages are on the free list.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 8531fc6f52f5 ("hugetlb: add hugetlb demote page support")
Signed-off-by: Mike Kravetz <[email protected]>
Reviewed-by: Naoya Horiguchi <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions