virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] virtio-balloon: move release_pages_balloon() outside of mutex_unlock(&vb->balloon_lock)
       [not found] <20210326095326.13221-1-liu.xiang@zlingsmart.com>
@ 2021-03-26 11:13 ` David Hildenbrand
  0 siblings, 0 replies; only message in thread
From: David Hildenbrand @ 2021-03-26 11:13 UTC (permalink / raw)
  To: Liu Xiang, mst; +Cc: liuxiang_1999, liuxiang1999, linux-kernel, virtualization

On 26.03.21 10:53, Liu Xiang wrote:
> Since pages have been deflated to a local list,
> there is no race between fill and leak.
> 
> Signed-off-by: Liu Xiang <liu.xiang@zlingsmart.com>
> ---
>   drivers/virtio/virtio_balloon.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
> index 8985fc2ce..7da25b87f 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -303,8 +303,8 @@ static unsigned leak_balloon(struct virtio_balloon *vb, size_t num)
>   	 */
>   	if (vb->num_pfns != 0)
>   		tell_host(vb, vb->deflate_vq);
> -	release_pages_balloon(vb, &pages);
>   	mutex_unlock(&vb->balloon_lock);
> +	release_pages_balloon(vb, &pages);
>   	return num_freed_pages;
>   }
>   
> 

I think this should be fine

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-26 11:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210326095326.13221-1-liu.xiang@zlingsmart.com>
2021-03-26 11:13 ` [PATCH] virtio-balloon: move release_pages_balloon() outside of mutex_unlock(&vb->balloon_lock) David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).