提交 c5e2254f 编写于 作者: K K. Y. Srinivasan 提交者: Greg Kroah-Hartman

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: NK. Y. Srinivasan <kys@microsoft.com>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ed07ec93
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册