From: David Hildenbrand <david@redhat.com>
To: Liu Xiang <liu.xiang@zlingsmart.com>, mst@redhat.com
Cc: liuxiang_1999@126.com, liuxiang1999@gmail.com,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio-balloon: move release_pages_balloon() outside of mutex_unlock(&vb->balloon_lock)
Date: Fri, 26 Mar 2021 12:13:31 +0100 [thread overview]
Message-ID: <d8fef7b4-d01c-98ad-c3b1-4c48f482ce76@redhat.com> (raw)
In-Reply-To: <20210326095326.13221-1-liu.xiang@zlingsmart.com>
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
parent reply other threads:[~2021-03-26 11:13 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20210326095326.13221-1-liu.xiang@zlingsmart.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d8fef7b4-d01c-98ad-c3b1-4c48f482ce76@redhat.com \
--to=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liu.xiang@zlingsmart.com \
--cc=liuxiang1999@gmail.com \
--cc=liuxiang_1999@126.com \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).