[PATCH] KVM: remove unused code in kvm_coalesced_mmio_init()

2010-04-11 Thread wzt . wzt
ret is already set as ENOMEM before, so the second ret = -ENOMEM; can be removed. Signed-off-by: Zhitong Wang zhitong.wan...@alibaba-inc.com --- virt/kvm/coalesced_mmio.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/virt/kvm/coalesced_mmio.c

[PATCH] KVM: Enhance the coalesced_mmio_write() parameter to avoid stack buffer overflow

2010-04-11 Thread wzt . wzt
coalesced_mmio_write() is not check the len value, if len is negative, memcpy(ring-coalesced_mmio[ring-last].data, val, len); will cause stack buffer overflow. Signed-off-by: Zhitong Wang zhitong.wan...@alibaba-inc.com --- virt/kvm/coalesced_mmio.c |4 1 files changed, 4 insertions(+),