summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2016-04-30 19:21:35 -0700
committerSasha Levin <alexander.levin@microsoft.com>2018-01-17 12:29:20 -0500
commit33097614b509ededfc4d416b062b0d253c4cfb0b (patch)
tree1c1086623c939907d56e77b26df6aa9f94aa0066 /arch/s390
parent626143bc3937e1b00c3ef1fc31923939f1b943fc (diff)
Drivers: hv: balloon: don't crash when memory is added in non-sorted order
[ Upstream commit 77c0c9735bc0ba5898e637a3a20d6bcb50e3f67d ] When we iterate through all HA regions in handle_pg_range() we have an assumption that all these regions are sorted in the list and the 'start_pfn >= has->end_pfn' check is enough to find the proper region. Unfortunately it's not the case with WS2016 where host can hot-add regions in a different order. We end up modifying the wrong HA region and crashing later on pages online. Modify the check to make sure we found the region we were searching for while iterating. Fix the same check in pfn_covered() as well. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Diffstat (limited to 'arch/s390')
0 files changed, 0 insertions, 0 deletions