Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282042
b: refs/heads/master
c: cdfca7b
h: refs/heads/master
v: v3
  • Loading branch information
Sasha Levin authored and Avi Kivity committed Dec 27, 2011
1 parent 06bed89 commit 36e1c40
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f745f1e224e05e845a15760a55f3fd323f7a753
refs/heads/master: cdfca7b346e6dbab1ba33260c28ccb8333485a5b
4 changes: 2 additions & 2 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -3031,10 +3031,10 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm,
memset(dirty_bitmap_head, 0, n);

r = -ENOMEM;
slots = kzalloc(sizeof(struct kvm_memslots), GFP_KERNEL);
slots = kmemdup(kvm->memslots, sizeof(*kvm->memslots), GFP_KERNEL);
if (!slots)
goto out;
memcpy(slots, kvm->memslots, sizeof(struct kvm_memslots));

memslot = id_to_memslot(slots, log->slot);
memslot->nr_dirty_pages = 0;
memslot->dirty_bitmap = dirty_bitmap_head;
Expand Down
7 changes: 3 additions & 4 deletions trunk/virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2591,13 +2591,12 @@ int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx,
int i, r;
struct kvm_io_bus *new_bus, *bus;

new_bus = kzalloc(sizeof(struct kvm_io_bus), GFP_KERNEL);
bus = kvm->buses[bus_idx];

new_bus = kmemdup(bus, sizeof(*bus), GFP_KERNEL);
if (!new_bus)
return -ENOMEM;

bus = kvm->buses[bus_idx];
memcpy(new_bus, bus, sizeof(struct kvm_io_bus));

r = -ENOENT;
for (i = 0; i < new_bus->dev_count; i++)
if (new_bus->range[i].dev == dev) {
Expand Down

0 comments on commit 36e1c40

Please sign in to comment.