summaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-10-19 22:31:14 +0200
committerTakashi Iwai <tiwai@suse.de>2013-10-19 22:31:14 +0200
commit20c87bd40e6c1ff7e31cc5eea4fb37829a57eb58 (patch)
tree528c2f113e428e060e185ccab7eab8d8e87c7d36 /virt/kvm
parentALSA: hdsp - info leak in snd_hdsp_hwdep_ioctl() (diff)
parentMerge remote-tracking branch 'asoc/fix/tlv320aic3x' into asoc-linus (diff)
downloadlinux-20c87bd40e6c1ff7e31cc5eea4fb37829a57eb58.tar.xz
linux-20c87bd40e6c1ff7e31cc5eea4fb37829a57eb58.zip
Merge tag 'asoc-v3.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.12 A number of small, fairly unexciting, fixes for drivers - nothing stand out.
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/kvm_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 979bff485fb0..a9dd682cf5e3 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1064,10 +1064,12 @@ EXPORT_SYMBOL_GPL(gfn_to_hva);
unsigned long gfn_to_hva_prot(struct kvm *kvm, gfn_t gfn, bool *writable)
{
struct kvm_memory_slot *slot = gfn_to_memslot(kvm, gfn);
- if (writable)
+ unsigned long hva = __gfn_to_hva_many(slot, gfn, NULL, false);
+
+ if (!kvm_is_error_hva(hva) && writable)
*writable = !memslot_is_readonly(slot);
- return __gfn_to_hva_many(gfn_to_memslot(kvm, gfn), gfn, NULL, false);
+ return hva;
}
static int kvm_read_hva(void *data, void __user *hva, int len)