diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2016-04-30 19:21:35 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-01 09:23:14 -0700 |
commit | 77c0c9735bc0ba5898e637a3a20d6bcb50e3f67d (patch) | |
tree | 602f121e1e1a82323600016e99f41b28746cf32d /samples | |
parent | cd95aad5579371ac332507fc946008217fc37e6c (diff) | |
download | op-kernel-dev-77c0c9735bc0ba5898e637a3a20d6bcb50e3f67d.zip op-kernel-dev-77c0c9735bc0ba5898e637a3a20d6bcb50e3f67d.tar.gz |
Drivers: hv: balloon: don't crash when memory is added in non-sorted order
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>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions