projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65844bb
)
kvm: x86: i8259: return initialized data on invalid-size read
author
Petr Matousek
<
[email protected]
>
Wed, 11 Mar 2015 11:16:09 +0000
(12:16 +0100)
committer
Paolo Bonzini
<
[email protected]
>
Mon, 30 Mar 2015 14:40:07 +0000
(16:40 +0200)
If data is read from PIC with invalid access size, the return data stays
uninitialized even though success is returned.
Fix this by always initializing the data.
Signed-off-by: Petr Matousek <
[email protected]
>
Reported-by: Nadav Amit <
[email protected]
>
Message-Id: <
20150311111609
[email protected]
>
Signed-off-by: Paolo Bonzini <
[email protected]
>
arch/x86/kvm/i8259.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/i8259.c
b/arch/x86/kvm/i8259.c
index cc31f7c06d3ddc8ab4ef61c775510e2dcbfde518..9541ba34126b90123ddfe383453145ddfcf789c4 100644
(file)
--- a/
arch/x86/kvm/i8259.c
+++ b/
arch/x86/kvm/i8259.c
@@
-507,6
+507,7
@@
static int picdev_read(struct kvm_pic *s,
return -EOPNOTSUPP;
if (len != 1) {
+ memset(val, 0, len);
pr_pic_unimpl("non byte read\n");
return 0;
}