Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5e2254f authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

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: default avatarK. Y. Srinivasan <kys@microsoft.com>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ed07ec93
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -975,6 +975,14 @@ static void post_status(struct hv_dynmem_device *dm)
				dm->num_pages_ballooned +
				dm->num_pages_ballooned +
				compute_balloon_floor();
				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,
	vmbus_sendpacket(dm->dev->channel, &status,
				sizeof(struct dm_status),
				sizeof(struct dm_status),
				(unsigned long)NULL,
				(unsigned long)NULL,