aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2013-07-15 01:38:12 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-04 04:50:58 -0400
commite39992ecaa7230126f96285a19493a9883294fdf (patch)
treef943440ded88a7d040b579a80414aad42ae899a9
parent7b7295e5a040abf574110c14de67e6b463a1d921 (diff)
Drivers: hv: balloon: Do not post pressure status if interrupted
commit c5e2254f8d63a6654149aa32ac5f2b7dd66a976d upstream. When we are posting pressure status, we may get interrupted and handle the un-balloon operation. In this case just don't post the status as we know the pressure status is stale. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/hv/hv_balloon.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index 61b7351df1d4..deb5c25305af 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -975,6 +975,14 @@ static void post_status(struct hv_dynmem_device *dm)
975 dm->num_pages_ballooned + 975 dm->num_pages_ballooned +
976 compute_balloon_floor(); 976 compute_balloon_floor();
977 977
978 /*
979 * If our transaction ID is no longer current, just don't
980 * send the status. This can happen if we were interrupted
981 * after we picked our transaction ID.
982 */
983 if (status.hdr.trans_id != atomic_read(&trans_id))
984 return;
985
978 vmbus_sendpacket(dm->dev->channel, &status, 986 vmbus_sendpacket(dm->dev->channel, &status,
979 sizeof(struct dm_status), 987 sizeof(struct dm_status),
980 (unsigned long)NULL, 988 (unsigned long)NULL,