diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2013-07-14 22:38:12 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-16 23:19:19 -0700 |
commit | c5e2254f8d63a6654149aa32ac5f2b7dd66a976d (patch) | |
tree | 8c94207755dd0b7c9b8caf65102bf59f912ccab4 /drivers/hv/hv_balloon.c | |
parent | ed07ec93e83ec471d365ce084e43ad90fd205903 (diff) | |
download | linux-c5e2254f8d63a6654149aa32ac5f2b7dd66a976d.tar.bz2 |
Drivers: hv: balloon: Do not post pressure status if interrupted
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>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/hv_balloon.c')
-rw-r--r-- | drivers/hv/hv_balloon.c | 8 |
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) dm->num_pages_ballooned + compute_balloon_floor(); + /* + * If our transaction ID is no longer current, just don't + * send the status. This can happen if we were interrupted + * after we picked our transaction ID. + */ + if (status.hdr.trans_id != atomic_read(&trans_id)) + return; + vmbus_sendpacket(dm->dev->channel, &status, sizeof(struct dm_status), (unsigned long)NULL, |