Red Hat Bugzilla – Bug 1026903
QMP: human-monitor-command: fix buffer duplication
Last modified: 2014-10-14 02:54:03 EDT
The upstream series changing the human-monitor-command not to use the Memory chardev driver in range "git log d05ef16..4bf0bb" was only partially backported by series fixing bug 909059. The end result is a weird and dangerous mix of dynamic buffers when the human-monitor-command is run, although it seems to work.
The missing upstream commits are 48c043d0d1835c64b571c484a9f229fe6d220287 and 4bf0bb8014ac2ac61b1004f5d92b2a4594d48017.
Apparently the human-monitor-command command still works and there's no visible behavior change. But we should backport the missing commits nevertheless, as future changes may introduce bugs.
As Luiz said, needed commits are:
1 48c043d hmp: human-monitor-command: stop using the Memory chardev driver
2 4bf0bb8 chardev: drop the Memory chardev driver
Commit 48c043d depends on commit
d51a67b4 qapi: Convert human-monitor-command
which Luiz had posted as patch 13/16 in the upstream series
QAPI conversions round 3
I tried to cherry-pick this patch as a dependency, just to see the lay of the land, but it runs into conflicts itself.
Hence I grepped the RHEL-6 qemu-kvm commit log for the string
(case insensitively). I found four occurrences:
- For bug 833530, I decided against backporting
qapi: Convert query-status
qapi: Convert cont
- For bug 802284, Federico backported
qapi: Convert blockdev_snapshot_sync
and scavenged some bits from the intrusive
qapi: convert query-name
qapi: Convert memsave
Considering the big number of conversion patches Luiz got merged upstream, I think we can say that comparatively we simply don't have those in RHEL-6. Hence I won't start backporting such patches at this stage of RHEL-6.
Reimplementing 48c043d on top of what we have in RHEL-6 now (ie. do_hmp_passthrough() instead of qmp_human_monitor_command) seems possible.
OTOH conflict resolution seems to be easier for d51a67b4 than rewriting 48c043d. (Supposing that, after porting / resolving d51a67b4, 48c043d would apply cleanly.)
Fix included in qemu-kvm-0.12.1.2-2.420.el6
To verify this bug, do we need to run a round of qmp function test? Or is there some other requirement?
Regression / sanity testing should be enough. Thanks!
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.