[ 57/99] Drivers: hv: balloon: Do not post pressure status if interrupted

From: Greg Kroah-Hartman
Date: Fri Aug 02 2013 - 06:46:41 EST

3.10-stable review patch. If anyone has any objections, please let me know.


From: "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

drivers/hv/hv_balloon.c | 8 ++++++++
1 file changed, 8 insertions(+)

--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -975,6 +975,14 @@ static void post_status(struct hv_dynmem
dm->num_pages_ballooned +

+ /*
+ * 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,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/