summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-09-08 04:02:35 (GMT)
committerAlex Shi <alex.shi@linaro.org>2017-09-08 04:02:35 (GMT)
commit537c78fc2374e2220f29f42f974ed4bce6bfe1ae (patch)
tree51747cc16cfc17d2de714bdbe929a42ef1286b39 /mm
parentf9ded7bcde96b12ea7dc81c85c09a98a71160652 (diff)
parent8a697a50c090053cf6c53a096972dd841332fe59 (diff)
downloadlinux-537c78fc2374e2220f29f42f974ed4bce6bfe1ae.tar.xz
Merge tag 'v4.9.48' into linux-linaro-lsk-v4.9
This is the 4.9.48 stable release
Diffstat (limited to 'mm')
-rw-r--r--mm/madvise.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/madvise.c b/mm/madvise.c
index 63a1216..55f30ec 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -533,6 +533,8 @@ static long madvise_remove(struct vm_area_struct *vma,
static int madvise_hwpoison(int bhv, unsigned long start, unsigned long end)
{
struct page *p;
+ struct zone *zone;
+
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
for (; start < end; start += PAGE_SIZE <<
@@ -561,6 +563,11 @@ static int madvise_hwpoison(int bhv, unsigned long start, unsigned long end)
if (ret)
return ret;
}
+
+ /* Ensure that all poisoned pages are removed from per-cpu lists */
+ for_each_populated_zone(zone)
+ drain_all_pages(zone);
+
return 0;
}
#endif