[Qemu-devel] [PATCH v4] virtio-blk: trivial code optimization

2015-11-10 Thread arei.gonglei
From: Gonglei 1. avoid possible superflous checking 2. make code more robustness Signed-off-by: Gonglei --- v4: address possible integer underover [Stefan] please review again, thanks --- hw/block/virtio-blk.c | 28

[Qemu-devel] [PATCH v3] virtio-blk: trivial code optimization

2015-11-09 Thread arei.gonglei
From: Gonglei 1. avoid possible superflous checking 2. make code more robustness Signed-off-by: Gonglei Reviewed-by: Fam Zheng --- v3: change the third condition too [Paolo] add Fam's R-by --- hw/block/virtio-blk.c | 27

[Qemu-devel] [PATCH v2] virtio-blk: trivial code optimization

2015-11-08 Thread arei.gonglei
From: Gonglei 1. avoid possible superflous checking 2. make code more robustness Signed-off-by: Gonglei --- v2: address Paolo's comments, thanks. --- hw/block/virtio-blk.c | 27 +-- 1 file changed, 9 insertions(+), 18

[Qemu-devel] [PATCH] virtio-blk: trivial code optimization

2015-11-05 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/block/virtio-blk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 093e475..752586d 100644 --- a/hw/block/virtio-blk.c +++

[Qemu-devel] [PATCH] ivshmem-server: fix possible OVERRUN

2015-11-01 Thread arei.gonglei
From: Gonglei >>> CID 1337991: Memory - illegal accesses (OVERRUN) >>> Decrementing "i". The value of "i" is now 65534. 218 while (i--) { 219 event_notifier_cleanup(>vectors[i]); 220 } Signed-off-by: Gonglei

[Qemu-devel] [PATCH] vhost-scsi: fix wrong vhost-scsi firmware path

2015-08-25 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com vhost-scsi bootindex does't work because Qemu passes wrong fireware path to seabios. before: /pci@i0cf8/scsi@7channel@0/vhost-scsi@0,0 after applying the patch: /pci@i0cf8/scsi@7/channel@0/vhost-scsi@0,0 Reported-by: Subo su...@huawei.com Signed-off-by:

[Qemu-devel] [PATCH] vhost-scsi: Fix mask index err in vhost_scsi_start

2015-07-27 Thread arei.gonglei
From: Lu Lina lina.lul...@huawei.com Signed-off-by: Lu Lina lina.lul...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/scsi/vhost-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index 1941aa1..174b4d2 100644

[Qemu-devel] [PATCH for-2.4] vnc: fix memory leak

2015-07-22 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com If vnc's password is configured, it will leak memory which cipher variable pointed on every vnc connection. Cc: Daniel P. Berrange berra...@redhat.com Signed-off-by: Gonglei arei.gong...@huawei.com --- ui/vnc.c | 5 - 1 file changed, 4 insertions(+), 1

[Qemu-devel] [PATCH 2/4] ppc/spapr_drc: fix memory leak

2015-07-09 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com fix CID 1311373. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/ppc/spapr_drc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index ef98538..ee87432 100644 --- a/hw/ppc/spapr_drc.c +++

[Qemu-devel] [PATCH 0/4] fix memory leak

2015-07-09 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Spotted by Coverity. Gonglei (4): cpu: fix memory leak ppc/spapr_drc: fix memory leak arm/xlnx-zynqmp: fix memory leak vl.c: fix memory leak hw/arm/xlnx-zynqmp.c | 4 ++-- hw/ppc/spapr_drc.c | 1 + target-i386/cpu.c| 2 +- vl.c

[Qemu-devel] [PATCH 1/4] cpu: fix memory leak

2015-07-09 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Failing to save or free storage allocated by g_strdup(names[0]) leaks it. Actually, we can pass names[0] directly. Signed-off-by: Gonglei arei.gong...@huawei.com --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH 4/4] vl.c: fix memory leak

2015-07-09 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Failing to save or free storage allocated by g_strdup(cmd) leaks it. Let's use a variable to storage it. Signed-off-by: Gonglei arei.gong...@huawei.com --- vl.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index

[Qemu-devel] [PATCH 3/4] arm/xlnx-zynqmp: fix memory leak

2015-07-09 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com fix CID 1311372. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/arm/xlnx-zynqmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 5e72078..00c5943 100644 ---

[Qemu-devel] [PATCH] qemu-doc: fix typos

2015-07-03 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- qemu-doc.texi | 2 +- qemu-options.hx | 2 +- qemu-tech.texi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-doc.texi b/qemu-doc.texi index 0125bc7..94af8c0 100644 ---

[Qemu-devel] [PATCH] rocker: fix memory leak

2015-06-25 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Meanwhile, using g_new0 instead of g_malloc0, refer to commit 5839e53. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/net/rocker/rocker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/net/rocker/rocker.c

[Qemu-devel] [PATCH v2] ossaudio: fix memory leak

2015-06-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Variable conf going out of scope leaks the storage it points to in line 856. Signed-off-by: Gonglei arei.gong...@huawei.com --- v2: using an better way to avoid memory leak. (Markus) --- audio/ossaudio.c | 9 +++-- 1 file changed, 3 insertions(+), 6

[Qemu-devel] [PATCH] virito-blk: drop duplicate check

2015-06-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com in_num = req-elem.in_num, and req-elem.in_num is checked in line 489, so the check about in_num variable is superflous, let's drop it. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/block/virtio-blk.c | 3 +-- 1 file changed, 1 insertion(+), 2

[Qemu-devel] [PATCH v2] rdma: fix memory leak

2015-06-23 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Variable r going out of scope leaks the storage it points to in line 3268. Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Amit Shah amit.s...@redhat.com --- v2: - Drop needless initialization. (Markus Paolo) - add Amit's R-by. ---

[Qemu-devel] [PATCH] rdma: fix memory leak

2015-06-22 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Variable r going out of scope leaks the storage it points to in line 3268. Signed-off-by: Gonglei arei.gong...@huawei.com --- migration/rdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/rdma.c b/migration/rdma.c index

[Qemu-devel] [PATCH] ossaudio: fix memory leak

2015-06-22 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Variable conf going out of scope leaks the storage it points to in line 856. Signed-off-by: Gonglei arei.gong...@huawei.com --- audio/ossaudio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 11e76a1..7dbe333

[Qemu-devel] [PATCH 2/2] qdev: fix OVERFLOW_BEFORE_WIDEN

2015-06-22 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Potentially overflowing expression 1 prop-bitnr with type int (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a context that expects an expression of type uint64_t (64 bits, unsigned). Cc: Gerd Hoffmann kra...@redhat.com

[Qemu-devel] [PATCH 0/2] fix two overflow problems

2015-06-22 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Gonglei (2): virito-pci: fix OVERRUN problem qdev: fix OVERFLOW_BEFORE_WIDEN hw/core/qdev-properties.c | 2 +- hw/virtio/virtio-pci.c| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 1.7.12.4

[Qemu-devel] [PATCH 1/2] virito-pci: fix OVERRUN problem

2015-06-22 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Overrunning array proxy-guest_features of 2 4-byte elements at element index 2 (byte offset 8) using index proxy-gfselect (which evaluates to 2). Normally, the Linux kernel driver just read/write '0' or '1' as the proxy-gfselect values, so using '' instead of

[Qemu-devel] [PATCH] qemu-error: make the timestamp more obvious and clear

2015-05-20 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com before: (qemu) 2015-05-21T02:07:43.695065Z qemu-system-x86_64: test after applying this patch: (qemu) [2015-05-21T02:21:46.023619Z UTC] qemu-system-x86_64: test Cc: Eric Blake ebl...@redhat.com Signed-off-by: Gonglei arei.gong...@huawei.com ---

[Qemu-devel] [PATCH 6/6] vt82c686: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/isa/vt82c686.c | 47 --- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index b8197b1..bb6f6df 100644 ---

[Qemu-devel] [PATCH 1/6] pci-assign: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/i386/kvm/pci-assign.c | 39 +-- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c index

[Qemu-devel] [PATCH 4/6] wdt_i6300esb: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/watchdog/wdt_i6300esb.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/watchdog/wdt_i6300esb.c b/hw/watchdog/wdt_i6300esb.c index 4ebdbb8..cfa2b1b 100644 ---

[Qemu-devel] [PATCH 5/6] xen_pt: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Cc: Stefano Stabellini stefano.stabell...@eu.citrix.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/xen/xen_pt.c | 10 +- hw/xen/xen_pt.h | 4 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/xen/xen_pt.c

[Qemu-devel] [PATCH 2/6] piix: piix3 QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/pci-host/piix.c | 57 +- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 723836f..f0fe4a1

[Qemu-devel] [PATCH 3/6] piix4: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/isa/piix4.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index d9522b1..2c59e91 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -34,6

[Qemu-devel] [PATCH 0/3] hw/display: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Hi, These three patches just some cleanup work about DO_UPCAST(). Please review, Thanks Cc: Gerd Hoffmann kra...@redhat.com Gonglei (3): vga-pci: QOMify cirrus_vga: QOMify qxl: QOMify hw/display/cirrus_vga.c | 8 ++-- hw/display/qxl.c

[Qemu-devel] [PATCH 3/3] qxl: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/display/qxl.c | 44 ++-- hw/display/qxl.h | 3 +++ 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index

[Qemu-devel] [PATCH 1/3] vga-pci: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/display/vga-pci.c | 48 ++-- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index aabfc23..ff5dfb2

[Qemu-devel] [PATCH 2/3] cirrus_vga: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com QOMify pci-cirrus-vga like isa-cirrus-vga device. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/display/cirrus_vga.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index

[Qemu-devel] [PATCH 0/6] pci/isa: QOMify

2015-05-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Because DO_UPCAST() is long deprecated, let me do some cleanup work. Please review, thanks Cc: Michael S. Tsirkin m...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Gonglei (6): pci-assign: QOMify piix: piix3 QOMify piix4: QOMify wdt_i6300esb:

[Qemu-devel] [PATCH 00/14] usb: QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Because DO_UPCAST() is long deprecated, let me do some cleanup work for usb sub-system, which I have said in previous conversation of a bugfix. Patch 7 is a bugfix. Please review, thanks :) Gonglei (14): uhci: QOMify usb: usb-audio QOMify usb:

[Qemu-devel] [PATCH 14/14] usb: usb-serial QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-serial.c | 43 +++ 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 67c2072..6ca3da9 100644

[Qemu-devel] [PATCH 10/14] usb: usb-storage QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-storage.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index ae8d40d..abe0e1d 100644 ---

[Qemu-devel] [PATCH 11/14] usb: usb-uas QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-uas.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 04fc515..38b26c5 100644 --- a/hw/usb/dev-uas.c +++

[Qemu-devel] [PATCH 13/14] usb: usb-redir QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/redirect.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 2416de8..242a654 100644 --- a/hw/usb/redirect.c

[Qemu-devel] [PATCH 02/14] usb: usb-audio QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-audio.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index 67deffe..f092bb8 100644 --- a/hw/usb/dev-audio.c

[Qemu-devel] [PATCH 01/14] uhci: QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Cc: Gerd Hoffmann kra...@redhat.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/hcd-uhci.c | 43 +++ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c

[Qemu-devel] [PATCH 04/14] usb: usb-hid QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-hid.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c index 507c966..9623e72 100644 ---

[Qemu-devel] [PATCH 12/14] usb: usb-wacom-tablet QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-wacom.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-wacom.c b/hw/usb/dev-wacom.c index 844eafa..c2450e7 100644 --- a/hw/usb/dev-wacom.c +++

[Qemu-devel] [PATCH 06/14] usb: usb-mtp QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-mtp.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 108ece8..c9c1f32 100644 --- a/hw/usb/dev-mtp.c +++

[Qemu-devel] [PATCH 09/14] usb: usb-ccid QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-smartcard-reader.c | 50 --- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c

[Qemu-devel] [PATCH 03/14] usb: usb-bt QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-bluetooth.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/usb/dev-bluetooth.c b/hw/usb/dev-bluetooth.c index 9bf6730..b19ec76 100644 ---

[Qemu-devel] [PATCH 07/14] usb-mtp: fix segmentation fault

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When x-root property not be configured, will cause segfault because of null pointer accessing. Add a check for s-root property avoid segfault. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-mtp.c | 4 1 file changed, 4 insertions(+)

[Qemu-devel] [PATCH 08/14] usb: usb-net QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-network.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index 1866991..5f2ffd0 100644 --- a/hw/usb/dev-network.c +++

[Qemu-devel] [PATCH 05/14] usb: usb-hub QOMify

2015-05-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/dev-hub.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 0482f58..c8c6855 100644 --- a/hw/usb/dev-hub.c +++

[Qemu-devel] [PATCH 1/3] target-mips: fix memory leak

2015-04-28 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Coveristy reports that variable prom_buf/params_buf going out of scope leaks the storage it points to. Cc: Aurelien Jarno aurel...@aurel32.net Cc: Leon Alrae leon.al...@imgtec.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/mips/mips_fulong2e.c |

[Qemu-devel] [PATCH 3/3] vhost-user: remove superfluous '\n' around error_report()

2015-04-28 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/virtio/vhost-user.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index aefe0bb..e7ab829 100644 ---

[Qemu-devel] [PATCH 0/3] trivial patches

2015-04-28 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com These trivial patches are collected by me during qemu 2.3 hard-freeze time, which spoted by coverity. Please ack or review if possible, thanks. Gonglei (3): target-mips: fix memory leak xhci: remove unused code vhost-user: remove superfluous '\n'

[Qemu-devel] [PATCH 2/3] xhci: remove unused code

2015-04-28 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Value from xfer-packet.ep is assigned to ep here, but that stored value is not used before it is overwritten. Remove it. Cc: Gerd Hoffmann kra...@redhat.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/usb/hcd-xhci.c | 1 - 1 file changed, 1

[Qemu-devel] [PATCH] misc: fix typos in copyright declaration

2015-03-26 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Add a space after comma. Signed-off-by: Gonglei arei.gong...@huawei.com --- bootdevice.c | 2 +- tests/usb-hcd-ohci-test.c | 2 +- tests/usb-hcd-uhci-test.c | 2 +- tests/usb-hcd-xhci-test.c | 2 +- 4 files changed, 4 insertions(+), 4

[Qemu-devel] [PATCH v4 1/3] uhci: fix segfault when hot-unplugging uhci controller

2015-03-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

[Qemu-devel] [PATCH v4 0/3] usb: fix segfault when hot-unplugging usb host adapter

2015-03-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging.

[Qemu-devel] [PATCH v4 3/3] ohci: fix resource cleanup leak

2015-03-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

[Qemu-devel] [PATCH v4 2/3] ehci: fix segfault when hot-unplugging ehci controller

2015-03-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

[Qemu-devel] [PATCH v3 2/3] ehci: fix segfault when hot-unplugging ehci controller

2015-03-17 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

[Qemu-devel] [PATCH v3 1/3] uhci: fix segfault when hot-unplugging uhci controller

2015-03-17 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

[Qemu-devel] [PATCH v3 0/3] usb: fix segfault when hot-unplugging usb host adapter

2015-03-17 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging.

[Qemu-devel] [PATCH v2 1/3] uhci: using DeviceClasss-reset qemu_register_reset() call

2015-03-17 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

[Qemu-devel] [PATCH v2 2/3] ehci: using DeviceClasss-reset qemu_register_reset() call

2015-03-17 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

[Qemu-devel] [PATCH v2 3/3] ohci: using DeviceClasss-reset qemu_register_reset() call

2015-03-17 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

[Qemu-devel] [PATCH v3 3/3] ohci: fix resource cleanup leak

2015-03-17 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

[Qemu-devel] [PATCH v2 0/3] usb: fix segfault when hot-unplugging usb host adapter

2015-03-17 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging.

[Qemu-devel] [PATCH] usb: fix segfault when hot-unplugging usb host adapter

2015-03-17 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involed registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Cc:

[Qemu-devel] [PATCH v2] vnc: fix segmentation fault when invalid vnc parameters are specified

2015-03-12 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Reproducer: #./qemu-system-x86_64 -vnc :0,ip qemu-system-x86_64: -vnc :1,ip: Invalid parameter 'ip' Segmentation fault (core dumped) Signed-off-by: Gonglei arei.gong...@huawei.com --- v2: remove useless initialization for variable id. (mjt) --- ui/vnc.c |

[Qemu-devel] [PATCH 2/2] vnc: avoid possible file handler leak

2015-03-11 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com vs-lsock may equal to 0, modify the check condition, avoid possible vs-lsock leak. Signed-off-by: Gonglei arei.gong...@huawei.com --- ui/vnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vnc.c b/ui/vnc.c index 10a2724..259eca2

[Qemu-devel] [PATCH 1/2] ui/console: fix OVERFLOW_BEFORE_WIDEN

2015-03-11 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- ui/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/console.c b/ui/console.c index 87af6b5..b15ca87 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1285,9 +1285,9 @@

[Qemu-devel] [PATCH 0/2] ui: two small fixes

2015-03-11 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com patch 1 reported by coverity several month ago, patch 2 is founded by code review. Gonglei (2): ui/console: fix OVERFLOW_BEFORE_WIDEN vnc: avoid possible file handler leak ui/console.c | 4 ++-- ui/vnc.c | 2 +- 2 files changed, 3 insertions(+), 3

[Qemu-devel] [PATCH] vnc: fix segmentation fault when invalid vnc parameters are specified

2015-03-11 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Reproducer: #./qemu-system-x86_64 -vnc :0,ip qemu-system-x86_64: -vnc :1,ip: Invalid parameter 'ip' Segmentation fault (core dumped) Signed-off-by: Gonglei arei.gong...@huawei.com --- This patch bases on Gerd's vnc queue. --- ui/vnc.c | 7 ++- 1 file

[Qemu-devel] [PATCH v2] microblaze: fix memory leak

2015-03-04 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When not assign a -dtb argument, the variable dtb_filename storage returned from qemu_find_file(), which should be freed after use. Alternatively we define a local variable filename, with 'char *' type, free after use. Cc: Michael Tokarev m...@tls.msk.ru Cc:

[Qemu-devel] [PATCH v2] arm: fix memory leak

2015-03-04 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Cc: Michael Tokarev m...@tls.msk.ru Cc: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Gonglei arei.gong...@huawei.com --- v2: Fix a complier error, remove `const' from the variable declaration. (mjt) --- hw/arm/digic_boards.c | 1 +

[Qemu-devel] [PULL 1/2] bootdevice: check boot order argument validation before vm running

2015-03-02 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Either 'once' option or 'order' option can take effect for -boot at the same time, that is say initial startup processing can check only one. And pc.c's set_boot_dev() fails when its boot order argument is invalid. This patch provide a solution fix this

[Qemu-devel] [PULL 0/2] bootdevice patches

2015-03-02 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com The following changes since commit 0856579cac2f1dacecd847cfcd89680d26ff78f5: Revert Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2015-03-03 00:29:17 +) are available in the git repository at:

[Qemu-devel] [PULL 2/2] bootdevice: add check in restore_boot_order()

2015-03-02 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com qemu_boot_set() can't fail in restore_boot_order(), then simply assert it doesn't fail, by passing error_abort if boot_set_handler set. Suggested-by: Markus Armbruster arm...@redhat.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus

[Qemu-devel] [PATCH v2 2/2] qemu-char: add cyrillic key 'numerosign' to Russian keymap

2015-02-28 Thread arei.gonglei
From: Wang Xin wangxinxin.w...@huawei.com numero sign is the number sign key of Russian keyboard layout, we get this key with press 'shift + 3'. It's missing in current Russian keymap file, this patch fix it. As number sign is not exsit in Russian keyboard layout[1][2], this patch also remove the

[Qemu-devel] [PATCH v2 0/2] Fix key 'numerosign' missing in Russian keyboard

2015-02-28 Thread arei.gonglei
From: Wang Xin wangxinxin.w...@huawei.com Add the keysym and keycode of 'numerosign' in Russian keyboard layout to VNC keysyms table and keymap. v2-v1: Remove the key 'numbersign' from Russian keymap as it is not exsit in Russian keyboard layout. Wang Xin (2): qemu-char: add cyrillic

[Qemu-devel] [PATCH v2 1/2] qemu-char: add cyrillic characters 'numerosign' to VNC keysyms

2015-02-28 Thread arei.gonglei
From: Wang Xin wangxinxin.w...@huawei.com This patch adds missing cyrillic characters 'numerosign' to the VNC keysym table, it's need by Russian keyboard. And I get the keysym from 'X11/keysymdef.h', the current keysym table in Qemu was generated from it. Signed-off-by: Wang xin

[Qemu-devel] [PATCH v2] e500: fix memory leak

2015-02-28 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- v2: fix compilation complaint. (mjt) --- hw/ppc/e500.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 7e17d18..c060b50 100644 --- a/hw/ppc/e500.c +++

[Qemu-devel] [PATCH 9/9] microblaze: fix memory leak

2015-02-26 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When not assign a -dtb argument, the variable dtb_filename storage returned from qemu_find_file(), which should be freed after using. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/microblaze/boot.c | 4 +++- 1 file changed, 3 insertions(+), 1

[Qemu-devel] [PATCH 4/9] macio: fix possible memory leak

2015-02-26 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com If ret = macio_initfn_ide() is less than 0, the timer_memory will leak the memory it points to. Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/misc/macio/macio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH 0/9] Coverity defects fixes

2015-02-26 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com All those defects are spotted by Coverity, which classed in high impact outstanding defects. Reports come from scan.coverity.com for Qemu. Cc: Paolo Bonzini pbonz...@redhat.com Cc: Markus Armbruster arm...@redhat.com Cc: qemu-triv...@nongnu.org Gonglei (9):

[Qemu-devel] [PATCH 8/9] sysbus: fix memory leak

2015-02-26 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- hw/core/sysbus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 84af593..b53c351 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -91,6 +91,8 @@ bool

[Qemu-devel] [PATCH 1/9] nbd: fix resource leak

2015-02-26 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com --- block/nbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/nbd.c b/block/nbd.c index 2f3b9ad..b9955cb 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -273,6 +273,7 @@ static int

[Qemu-devel] [PATCH] bootdevice: fix segment fault when booting guest with '-kernel' and '-initrd'

2015-02-26 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Reproducer: $./qemu-system-x86_64 --enable-kvm -kernel /home/vmlinuz-2.6.32.12-0.7-default \ -initrd /home/initrd-2.6.32.12-0.7-default -append \ root=/dev/ram rw console=ttyS0,115200 -dtb guest.dtb -vnc :10 --monitor stdio -smp 2 QEMU 2.2.50 monitor -

[Qemu-devel] [PATCH v2 04/11] numa: remove superfluous '\n' around error_setg

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com --- numa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/numa.c b/numa.c index afd2866..6decd13 100644 --- a/numa.c +++ b/numa.c @@

[Qemu-devel] [PATCH v2 01/11] block: remove superfluous '\n' around error_report/error_setg

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com --- block/archipelago.c | 6 +++--- hw/block/nand.c | 2 +- qemu-img.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH v2 05/11] Remove superfluous '\n' around error_report()

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com --- exec.c | 2 +- hw/ide/pci.c | 2 +- hw/microblaze/boot.c | 2 +- migration/rdma.c | 2 +- target-s390x/kvm.c | 2 +-

[Qemu-devel] [PATCH v2 08/11] xtensa: Remove superfluous '\n' around error_report()

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com --- hw/xtensa/sim.c| 2 +- hw/xtensa/xtfpga.c | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/xtensa/sim.c

[Qemu-devel] [PATCH v2 03/11] pl330.c: remove superfluous '\n' around error_setg

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com --- hw/dma/pl330.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index 16cf77e..5be3df5 100644 ---

[Qemu-devel] [PATCH v2 00/11] trivial: Remove superfluous '\n' around error_report/error_setg

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com v2 - v1: - remove superfluous in patch 3. (Michael Tokarev) - move qemu-img.c hunk from patch 5 to patch 1. (Markus) - add 'R-by' tag for this patch series. Yestoday, I found that some files have superflous '\n' charactor around error_report/error_setg

[Qemu-devel] [PATCH v2 07/11] vfio: Remove superfluous '\n' around error_report()

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com --- hw/vfio/common.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index c5d1551..9289389

[Qemu-devel] [PATCH v2 06/11] vhost-scsi: Remove superfluous '\n' around error_report()

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com --- hw/scsi/vhost-scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index

[Qemu-devel] [PATCH v2 09/11] tpm: Remove superfluous '\n' around error_report()

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com --- hw/tpm/tpm_passthrough.c | 12 ++-- tpm.c| 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git

[Qemu-devel] [PATCH v2 10/11] arm/digic_boards: Remove superfluous '\n' around error_report()

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com --- hw/arm/digic_boards.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c index

[Qemu-devel] [PATCH v2 11/11] vhost: Remove superfluous '\n' around error_report()

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com --- hw/virtio/vhost-backend.c | 2 +- net/vhost-user.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-backend.c

[Qemu-devel] [PATCH v2 02/11] a9gtimer: remove superfluous '\n' around error_setg

2015-02-24 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com --- hw/timer/a9gtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c index 435142a..b087bbd

  1   2   3   4   5   6   7   8   9   10   >