Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343497
b: refs/heads/master
c: 12ecd95
h: refs/heads/master
i:
  343495: 692f90c
v: v3
  • Loading branch information
Julia Lawall authored and Alexander Graf committed Oct 5, 2012
1 parent b54c7d7 commit 98659b3
Show file tree
Hide file tree
Showing 2 changed files with 14 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: 55b665b0263ae88a776071306ef1eee4b769016b
refs/heads/master: 12ecd9570d8941c15602a11725ec9b0ede48d6c2
19 changes: 13 additions & 6 deletions trunk/arch/powerpc/kvm/e500_tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,21 +1233,27 @@ int kvm_vcpu_ioctl_config_tlb(struct kvm_vcpu *vcpu,
}

virt = vmap(pages, num_pages, VM_MAP, PAGE_KERNEL);
if (!virt)
if (!virt) {
ret = -ENOMEM;
goto err_put_page;
}

privs[0] = kzalloc(sizeof(struct tlbe_priv) * params.tlb_sizes[0],
GFP_KERNEL);
privs[1] = kzalloc(sizeof(struct tlbe_priv) * params.tlb_sizes[1],
GFP_KERNEL);

if (!privs[0] || !privs[1])
goto err_put_page;
if (!privs[0] || !privs[1]) {
ret = -ENOMEM;
goto err_privs;
}

g2h_bitmap = kzalloc(sizeof(u64) * params.tlb_sizes[1],
GFP_KERNEL);
if (!g2h_bitmap)
goto err_put_page;
if (!g2h_bitmap) {
ret = -ENOMEM;
goto err_privs;
}

free_gtlb(vcpu_e500);

Expand Down Expand Up @@ -1287,10 +1293,11 @@ int kvm_vcpu_ioctl_config_tlb(struct kvm_vcpu *vcpu,
kvmppc_recalc_tlb1map_range(vcpu_e500);
return 0;

err_put_page:
err_privs:
kfree(privs[0]);
kfree(privs[1]);

err_put_page:
for (i = 0; i < num_pages; i++)
put_page(pages[i]);

Expand Down

0 comments on commit 98659b3

Please sign in to comment.