summaryrefslogtreecommitdiffstats
path: root/Documentation/ABI/stable
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2018-03-05 06:17:21 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-06 18:57:17 +0100
commitbba072d1627222325e79b7b8e6c0847e4a32d96c (patch)
treead0180b4990be6a6003075e0c08e1004df681542 /Documentation/ABI/stable
parenthv_balloon: simplify hv_online_page()/hv_page_online_one() (diff)
downloadlinux-bba072d1627222325e79b7b8e6c0847e4a32d96c.tar.xz
linux-bba072d1627222325e79b7b8e6c0847e4a32d96c.zip
hv_balloon: fix bugs in num_pages_onlined accounting
Our num_pages_onlined accounting is buggy: 1) In case we're offlining a memory block which was present at boot (e.g. when there was no hotplug at all) we subtract 32k from 0 and as num_pages_onlined is unsigned get a very big positive number. 2) Commit 6df8d9aaf3af ("Drivers: hv: balloon: Correctly update onlined page count") made num_pages_onlined counter accurate on onlining but totally incorrect on offlining for partly populated regions: no matter how many pages were onlined and what was actually added to num_pages_onlined counter we always subtract the full region (32k) so again, num_pages_onlined can wrap around zero. By onlining/offlining the same partly populated region multiple times we can make the situation worse. Solve these issues by doing accurate accounting on offlining: walk HAS list, check for covered range and gaps. Fixes: 6df8d9aaf3af ("Drivers: hv: balloon: Correctly update onlined page count") 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 'Documentation/ABI/stable')
0 files changed, 0 insertions, 0 deletions