summaryrefslogtreecommitdiff
path: root/drivers/hv
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2014-05-27 19:16:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-26 15:15:41 -0400
commitfd81b2dc6f499f8a572363bedfac5ead050842e2 (patch)
tree0bbe00377c06f6597c06d890a3dc6c6371bd52fc /drivers/hv
parentbdfbec3be201afa519e98b49984997dd2d4a509f (diff)
hv: use correct order when freeing monitor_pages
commit a100d88df1e924e5c9678fabf054d1bae7ab74fb upstream. We try to free two pages when only one has been allocated. Cleanup path is unlikely, so I haven't found any trace that would fit, but I hope that free_pages_prepare() does catch it. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Reviewed-by: Amos Kong <akong@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/connection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index 2e7801af466e..05827eccc53a 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -224,8 +224,8 @@ cleanup:
vmbus_connection.int_page = NULL;
}
- free_pages((unsigned long)vmbus_connection.monitor_pages[0], 1);
- free_pages((unsigned long)vmbus_connection.monitor_pages[1], 1);
+ free_pages((unsigned long)vmbus_connection.monitor_pages[0], 0);
+ free_pages((unsigned long)vmbus_connection.monitor_pages[1], 0);
vmbus_connection.monitor_pages[0] = NULL;
vmbus_connection.monitor_pages[1] = NULL;