mirror of https://github.com/proxmox/mirror_qemu
Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Amos Kong (1) and Luiz Capitulino (1) # Via Luiz Capitulino * luiz/queue/qmp: virtio-balloon: fix integer overflow in BALLOON_CHANGE QMP event monitor: fix the wrong order of releasing keys Message-id: 1366375833-995-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>master
commit
d639498852
|
@ -275,7 +275,7 @@ static void virtio_balloon_set_config(VirtIODevice *vdev,
|
||||||
dev->actual = le32_to_cpu(config.actual);
|
dev->actual = le32_to_cpu(config.actual);
|
||||||
if (dev->actual != oldactual) {
|
if (dev->actual != oldactual) {
|
||||||
qemu_balloon_changed(ram_size -
|
qemu_balloon_changed(ram_size -
|
||||||
(dev->actual << VIRTIO_BALLOON_PFN_SHIFT));
|
((ram_addr_t) dev->actual << VIRTIO_BALLOON_PFN_SHIFT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -234,13 +234,11 @@ static void free_keycodes(void)
|
||||||
|
|
||||||
static void release_keys(void *opaque)
|
static void release_keys(void *opaque)
|
||||||
{
|
{
|
||||||
int i;
|
while (keycodes_size > 0) {
|
||||||
|
if (keycodes[--keycodes_size] & 0x80) {
|
||||||
for (i = 0; i < keycodes_size; i++) {
|
|
||||||
if (keycodes[i] & 0x80) {
|
|
||||||
kbd_put_keycode(0xe0);
|
kbd_put_keycode(0xe0);
|
||||||
}
|
}
|
||||||
kbd_put_keycode(keycodes[i]| 0x80);
|
kbd_put_keycode(keycodes[keycodes_size] | 0x80);
|
||||||
}
|
}
|
||||||
|
|
||||||
free_keycodes();
|
free_keycodes();
|
||||||
|
|
Loading…
Reference in New Issue