Drivers: hv: balloon: reset host_specified_ha_region
authorVitaly Kuznetsov <vkuznets@redhat.com>
Sun, 1 May 2016 02:21:36 +0000 (19:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 May 2016 16:23:14 +0000 (09:23 -0700)
We set host_specified_ha_region = true on certain request but this is a
global state which stays 'true' forever. We need to reset it when we
receive a request where ha_region is not specified. I did not see any
real issues, the bug was found by code inspection.

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>
drivers/hv/hv_balloon.c

index 43af91362be584b12af80ff27083a8e863f5a10e..df35fb7ed5dfcf4e782839616c26533159f5b5a4 100644 (file)
@@ -1400,6 +1400,7 @@ static void balloon_onchannelcallback(void *context)
                                 * This is a normal hot-add request specifying
                                 * hot-add memory.
                                 */
+                               dm->host_specified_ha_region = false;
                                ha_pg_range = &ha_msg->range;
                                dm->ha_wrk.ha_page_range = *ha_pg_range;
                                dm->ha_wrk.ha_region_range.page_range = 0;
This page took 0.044716 seconds and 5 git commands to generate.