Commit 3459f11a8b16f40f9cde8e4281c2d5dd2ff1a732

Authored by Luiz Capitulino
Committed by Rusty Russell
1 parent af91706d5d

virtio_balloon: update_balloon_size(): update correct field

According to the virtio spec, the device configuration field
that should be updated after an inflation or deflation
operation is the 'actual' field, not the 'num_pages' one.

Commit 855e0c5288177bcb193f6f6316952d2490478e1c swapped them
in update_balloon_size(). Fix it.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: 855e0c5288177bcb193f6f6316952d2490478e1c

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/virtio/virtio_balloon.c
... ... @@ -285,7 +285,7 @@
285 285 {
286 286 __le32 actual = cpu_to_le32(vb->num_pages);
287 287  
288   - virtio_cwrite(vb->vdev, struct virtio_balloon_config, num_pages,
  288 + virtio_cwrite(vb->vdev, struct virtio_balloon_config, actual,
289 289 &actual);
290 290 }
291 291