All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] virtio_balloon: unlock on error in fill_balloon()
@ 2012-11-13  7:43 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-11-13  7:43 UTC (permalink / raw)
  To: Rusty Russell, Rafael Aquini
  Cc: virtualization, kernel-janitors, Michael S. Tsirkin

We recently added locking in fill_balloon() but there was one error path
which was missed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Only needed in linux-next.

diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index f70151b..1c50e98 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -153,9 +153,10 @@ static void fill_balloon(struct virtio_balloon *vb, size_t num)
 
 	/* Didn't get any?  Oh well. */
 	if (vb->num_pfns = 0)
-		return;
+		goto unlock;
 
 	tell_host(vb, vb->inflate_vq);
+unlock:
 	mutex_unlock(&vb->balloon_lock);
 }
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-13 14:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-13  7:43 [patch] virtio_balloon: unlock on error in fill_balloon() Dan Carpenter
2012-11-13  7:43 ` Dan Carpenter
2012-11-13 14:28 ` Rafael Aquini
2012-11-13 14:28   ` Rafael Aquini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.