migration wrong handling of KVM_GET_DIRTY_LOG ioctl

Bug #1294227 reported by Mario Smarduch
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

In the code below kvm_vm_ioctl(...) can return --errno != -1 from ioctl call, but return only checks for -1.
Found during KVM-ARM migration which apperead to go through but was actually failing getting
memslot dirty bitmap.

static int kvm_physical_sync_dirty_bitmap(....)
 if(kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) == -1) {
   - err out
 ... continue

Christoffer Dall (cdall)
Changed in qemu:
assignee: nobody → Christoffer Dall (cdall)
status: New → In Progress
Revision history for this message
Christoffer Dall (cdall) wrote :
Revision history for this message
Peter Maydell (pmaydell) wrote :

The apparently obvious fix was applied as commit b533f658a98325d0e4 but then reverted in commit 50212d6346f33d6e19, because not all errno returns from this ioctl should be treated as errors.

That commit message said "Revert that patch instead of fixing it properly this late in the release process. I disagree with this approach, but let's make things move _somewhere_, instead of arguing endlessly whch of the 2 proposed fixes is better." -- and then we never did a proper fix, so 5 years later we're still making an incorrect == -1 check...

Revision history for this message
John Snow (jnsnow) wrote :

Moving this bug back to Confirmed to move it out of "In progress" state. We still check for only -1 upstream.

Changed in qemu:
status: In Progress → Confirmed
assignee: Christoffer Dall (cdall) → nobody
Revision history for this message
Thomas Huth (th-huth) wrote :
Revision history for this message
Thomas Huth (th-huth) wrote :
Changed in qemu:
status: Confirmed → Fix Committed
Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers