mirror of
https://github.com/joel16/android_kernel_sony_msm8994_rework.git
synced 2024-12-02 16:57:06 +00:00
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>
This commit is contained in:
parent
7b7295e5a0
commit
e39992ecaa
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user