Hi,
Ping...
Is this acceptable?
Thanks,
zhanghailiang
On 2014/9/12 15:06, zhanghailiang wrote:
Add some trace events for easier debugging
Signed-off-by: zhanghailiang
---
hw/virtio/virtio-balloon.c | 6 ++
trace-events | 4
2 files changed, 10 insertions(+)
diff
On 2014/9/16 19:20, Igor Mammedov wrote:
On Tue, 16 Sep 2014 18:39:16 +0800
zhanghailiang wrote:
When do memory hotplug, if there is numa node, we should add
the memory size to the corresponding node memory size.
For now, it mainly affects the result of hmp command "info numa".
On 2014/9/17 16:32, Hu Tao wrote:
On Tue, Sep 16, 2014 at 06:39:15PM +0800, zhanghailiang wrote:
If we do not configure numa option, memory hotplug should work as well.
It should not depend on numa option.
Steps to reproduce:
(1) Start VM: qemu-kvm -m 1024,slots=4,maxmem=8G
(2) Hotplug memory
Hi,
Ping...
Is anyone concerned about this patch? Is this a bug?
Thanks,
zhanghailiang
On 2014/9/15 20:29, zhanghailiang wrote:
When do memory balloon, it references the ram_size as the real ram size of VM,
But here ram_size is not include the hotplugged memory, and the result will
be
If readdir_r fails, error_setg_errno will reference the freed
pointer *dirpath*.
Signed-off-by: zhanghailiang
---
qga/commands-posix.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 7eed7f4..3082eae 100644
--- a
When do memory hotplug, if there is numa node, we should add
the memory size to the corresponding node memory size.
For now, it mainly affects the result of hmp command "info numa".
Signed-off-by: zhanghailiang
---
v2:
- Don't modify the numa_info.node_mem directly when treating
On 2014/9/18 20:17, Eric Blake wrote:
On 09/17/2014 09:33 PM, zhanghailiang wrote:
If readdir_r fails, error_setg_errno will reference the freed
pointer *dirpath*.
Signed-off-by: zhanghailiang
---
qga/commands-posix.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions
On 2014/9/17 0:24, Markus Armbruster wrote:
zhanghailiang writes:
Functions shouldn't return an error code and an Error object at the same time.
Turn all these functions that returning Error object to void.
We also judge if a function success or fail by reference to the *errp.
Signed-o
If readdir_r fails, error_setg_errno will reference the freed
pointer *dirpath*.
Moreover, readdir_r may cause a buffer overflow, using readdir instead.
Signed-off-by: zhanghailiang
---
v2:
- Switch readdir_r to readdir (Comment of Eric Blake)
---
qga/commands-posix.c | 27
The logic of pcmcia_socket_unregister is wrong,
which will cause a freed memory accessing
Signed-off-by: zhanghailiang
---
Hi,
The function pcmcia_socket_unregister seemes to be unused,
Should it be removed? Thanks.
---
vl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
On 2014/9/19 9:43, Chen, Fan wrote:
On Thu, 2014-09-18 at 20:07 +0800, zhanghailiang wrote:
When do memory hotplug, if there is numa node, we should add
the memory size to the corresponding node memory size.
For now, it mainly affects the result of hmp command "info numa".
Sig
The second parameter of dump_error is unused, but one purpose of
using this function is to report the error info.
Use error_set to return the error info to the caller.
Signed-off-by: zhanghailiang
---
dump.c | 165 -
1 file
Functions shouldn't return an error code and an Error object at the same time.
Turn all these functions that returning Error object to void.
We also judge if a function success or fail by reference to the local_err.
Signed-off-by: zhanghailiang
---
dump.c
n functions like write_elf64_note() to void (Luiz Capitulino)
v3 -> v4:
- Adjust the errp argument to the end
- Remove trailing '.' in error messages
v2 -> v3:
- Drop the '\n' in the message when call dump_error(Eric Blake)
v1 -> v2:
- Return the error reason to t
On 2014/9/19 7:17, Andrew Jones wrote:
Replace all the fprintf(stderr, ...) calls with error_report.
Also make sure exit() consistently uses the error code 1. A few calls
used -1.
Signed-off-by: Andrew Jones
---
hw/misc/ivshmem.c | 39 +++
1 file changed,
On 2014/9/19 15:34, zhanghailiang wrote:
On 2014/9/19 7:17, Andrew Jones wrote:
Replace all the fprintf(stderr, ...) calls with error_report.
Also make sure exit() consistently uses the error code 1. A few calls
used -1.
Signed-off-by: Andrew Jones
---
hw/misc/ivshmem.c | 39
On 2014/9/19 21:51, Igor Mammedov wrote:
On Thu, 18 Sep 2014 20:07:08 +0800
zhanghailiang wrote:
When do memory hotplug, if there is numa node, we should add
the memory size to the corresponding node memory size.
For now, it mainly affects the result of hmp command "info numa".
Hi Igor,
Thanks for your reviewing...
On Mon, 15 Sep 2014 20:29:38 +0800
zhanghailiang wrote:
When do memory balloon, it references the ram_size as the real ram size of VM,
But here ram_size is not include the hotplugged memory, and the result will
be confused.
Steps to reproduce:
(1)Start
On 2014/9/22 17:03, Tang Chen wrote:
Hi Igor,
On 09/19/2014 08:26 PM, Igor Mammedov wrote:
On Wed, 17 Sep 2014 16:32:20 +0800
Hu Tao wrote:
On Tue, Sep 16, 2014 at 06:39:15PM +0800, zhanghailiang wrote:
If we do not configure numa option, memory hotplug should work as well.
It should not
igned-off-by: zhanghailiang
---
Hi,
Actually, for mbind and mlockall, i have made a test about the time consuming
for the different call sequence.
The results is shown below. It is obviously that mlockall called before mbind
is
more time-consuming.
Besides, this patch is OK with memory ho
When do memory hotplug, if there is numa node, we should add
the memory size to the corresponding node memory size.
For now, it mainly affects the result of hmp command "info numa".
Signed-off-by: zhanghailiang
---
v3:
- cold-plugged memory should not be excluded when stat memory
On 2014/9/23 16:35, Hu Tao wrote:
On Tue, Sep 23, 2014 at 11:30:26AM +0300, Michael S. Tsirkin wrote:
On Tue, Sep 23, 2014 at 03:57:47PM +0800, zhanghailiang wrote:
If we configure mlock=on and memory policy=bind at the same time,
It will consume lots of time for system to treat with memory
On 2014/9/23 17:01, Igor Mammedov wrote:
On Mon, 22 Sep 2014 14:17:28 +0300
"Michael S. Tsirkin" wrote:
On Fri, Sep 19, 2014 at 02:37:46PM +0200, Igor Mammedov wrote:
On Tue, 16 Sep 2014 18:39:15 +0800
zhanghailiang wrote:
If we do not configure numa option, memory hotplug shou
On 2014/9/23 16:58, Tang Chen wrote:
On 09/23/2014 04:40 PM, Igor Mammedov wrote:
..
It's fine to use SRAT for these purposes on baremetal NUMA systems since
due to used chipset constrains it's possible statically allocate ranges
for every possible DIMM socket.
However SRAT(which is optiona
On 2014/9/23 16:30, Michael S. Tsirkin wrote:
On Tue, Sep 23, 2014 at 03:57:47PM +0800, zhanghailiang wrote:
If we configure mlock=on and memory policy=bind at the same time,
It will consume lots of time for system to treat with memory,
especially when call mbind after mlockall.
Adjust the
ed-by: Michael S. Tsirkin
Signed-off-by: zhanghailiang
---
v2:
- Add Acked-by
- change 'int' to 'bool' (Thanks Hu Tao)
---
vl.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/vl.c b/vl.c
index dc792fe..35e5de6 100644
--- a/vl.c
+++ b/vl.c
On 2014/9/23 19:12, Igor Mammedov wrote:
On Tue, 23 Sep 2014 18:11:35 +0800
zhanghailiang wrote:
On 2014/9/23 16:58, Tang Chen wrote:
On 09/23/2014 04:40 PM, Igor Mammedov wrote:
..
It's fine to use SRAT for these purposes on baremetal NUMA systems since
due to used chipset const
Hi,
Ping...
Thanks,
zhanghailiang
On 2014/9/19 14:43, zhanghailiang wrote:
Hi,
In original code, Function dump_error ignores its second parameter which
contains
error reason, it is better to return the error message to the caller.
Here we use error_setg to return the error info to caller
Hi,
Ping...,plus;)
This is a bug fix.
Thanks,
zhanghailiang
On 2014/9/19 11:09, zhanghailiang wrote:
If readdir_r fails, error_setg_errno will reference the freed
pointer *dirpath*.
Moreover, readdir_r may cause a buffer overflow, using readdir instead.
Signed-off-by: zhanghailiang
Hi,
This has been reviewed, Will anyone pick this up?;)
Thanks,
zhanghailiang
On 2014/9/23 18:42, zhanghailiang wrote:
If we configure mlock=on and memory policy=bind at the same time,
It will consume lots of time for system to treat with memory,
especially when call mbind behind mlockall
. But not support Windows guest OS
to hotplug memory with no-NUMA config, actully, it's Windows limitation.
Reviewed-By: Igor Mammedov
Signed-off-by: zhanghailiang
---
v2:
- fix the title and message
- add reviewed-by
---
hw/mem/pc-dimm.c | 2 +-
1 file changed, 1 insertion(+), 1 del
Hi,
Ping^2...
Can anyone help reviewing this patch? Luiz? Eric? Markus? Thanks;)
Best regards,
zhanghailiang
On 2014/9/24 8:39, zhanghailiang wrote:
Hi,
Ping...
Thanks,
zhanghailiang
On 2014/9/19 14:43, zhanghailiang wrote:
Hi,
In original code, Function dump_error ignores its second
On 2014/9/26 23:35, Paolo Bonzini wrote:
Il 26/09/2014 10:35, zhanghailiang ha scritto:
Hi,
This has been reviewed, Will anyone pick this up?;)
I think mst will. It's Jewish new year this week, so it will have to
wait for next week.
OK, Thanks;)
Best Regard,
zhanghailiang
Paolo
T
On 2014/9/26 23:40, Paolo Bonzini wrote:
Il 19/09/2014 05:09, zhanghailiang ha scritto:
If readdir_r fails, error_setg_errno will reference the freed
pointer *dirpath*.
Moreover, readdir_r may cause a buffer overflow, using readdir instead.
Signed-off-by: zhanghailiang
---
v2:
- Switch
On 2014/9/29 15:48, Markus Armbruster wrote:
zhanghailiang writes:
The second parameter of dump_error is unused, but one purpose of
using this function is to report the error info.
Use error_set to return the error info to the caller.
Signed-off-by: zhanghailiang
The commit message
On 2014/9/26 19:53, Igor Mammedov wrote:
On Tue, 23 Sep 2014 16:11:25 +0800
zhanghailiang wrote:
When do memory hotplug, if there is numa node, we should add
the memory size to the corresponding node memory size.
For now, it mainly affects the result of hmp command "info numa".
On 2014/9/29 16:06, Markus Armbruster wrote:
zhanghailiang writes:
Functions shouldn't return an error code and an Error object at the same time.
Turn all these functions that returning Error object to void.
We also judge if a function success or fail by reference to the local_err.
S
#x27; in error messages
v2 -> v3:
- Drop the '\n' in the message when call dump_error (Eric Blake)
v1 -> v2:
- Return the error reason to the caller (Luiz Capitulino)
Thanks for review!;)
zhanghailiang (2):
dump: Propagate errors into qmp_dump_guest_memory()
dump: Turn some funct
Functions shouldn't return an error code and an Error object at the same time.
Turn all these functions that returning Error object to void.
We also judge if a function success or fail by reference to the local_err.
Signed-off-by: zhanghailiang
---
dump.c
useful error.
Reviewed-by: Markus Armbruster
Signed-off-by: zhanghailiang
---
dump.c | 165 -
1 file changed, 82 insertions(+), 83 deletions(-)
diff --git a/dump.c b/dump.c
index 71d3e94..07d2300 100644
--- a/dump.c
+++ b/dump.c
Hi,
Ping...:(
Thanks,
zhanghailiang
On 2014/9/30 17:20, zhanghailiang wrote:
Functions shouldn't return an error code and an Error object at the same time.
Turn all these functions that returning Error object to void.
We also judge if a function success or fail by reference to the loca
On 2014/10/4 1:47, Dr. David Alan Gilbert (git) wrote:
From: "Dr. David Alan Gilbert"
* Please comment on separate thread for this QEMUSizedBuffer patch *
This is based on Stefan and Joel's patch that creates a QEMUFile that goes
to a memory buffer; from:
http://lists.gnu.org/archive/html/qem
On 2014/10/4 1:47, Dr. David Alan Gilbert (git) wrote:
From: "Dr. David Alan Gilbert"
Suspend to file is very much like a migrate, and it makes life
easier if we have the Migration state available, so initialise it
in the savevm.c code for suspending.
Signed-off-by: Dr. David Alan Gilbert
---
On 2014/10/4 1:47, Dr. David Alan Gilbert (git) wrote:
From: "Dr. David Alan Gilbert"
On receiving MIG_RPCOMM_REQPAGES look up the address and
queue the page.
Signed-off-by: Dr. David Alan Gilbert
---
arch_init.c | 52 +++
include/m
On 2014/9/29 17:41, Dr. David Alan Gilbert (git) wrote:
From: "Dr. David Alan Gilbert"
This is based on Stefan and Joel's patch that creates a QEMUFile that goes
to a memory buffer; from:
http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html
Using the QEMUFile interface, this pat
Hi Igor,
On 2014/9/26 19:53, Igor Mammedov wrote:
On Tue, 23 Sep 2014 16:11:25 +0800
zhanghailiang wrote:
When do memory hotplug, if there is numa node, we should add
the memory size to the corresponding node memory size.
For now, it mainly affects the result of hmp command "info
On 2014/10/8 15:49, Dr. David Alan Gilbert wrote:
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote:
typedef struct Visitor Visitor;
@@ -80,6 +81,6 @@ typedef struct FWCfgState FWCfgState;
typedef struct PcGuestInfo PcGuestInfo;
typedef struct PostcopyPMI PostcopyPMI;
typedef
On 2014/10/8 15:28, zhanghailiang wrote:
Hi Igor,
On 2014/9/26 19:53, Igor Mammedov wrote:
On Tue, 23 Sep 2014 16:11:25 +0800
zhanghailiang wrote:
When do memory hotplug, if there is numa node, we should add
the memory size to the corresponding node memory size.
For now, it mainly affects
On 2014/10/8 17:08, Dr. David Alan Gilbert wrote:
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote:
+static ssize_t qsb_grow(QEMUSizedBuffer *qsb, size_t new_size)
+{
+size_t needed_chunks, i;
+
+if (qsb->size < new_size) {
+struct iovec *new_iov;
+
On 2014/8/8 21:24, Alex Bennée wrote:
zhanghailiang writes:
On 2014/8/8 17:43, Alex Bennée wrote:
zhanghailiang writes:
Signed-off-by: zhanghailiang
---
slirp/misc.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
Your indenting has gone a bit weird there.
Hmm
The function fstat() may fail, so check its return value.
Acked-by: Levente Kurusa
Signed-off-by: zhanghailiang
---
hw/misc/ivshmem.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 768e528..2be4b86 100644
--- a/hw/misc
In function virtio_blk_handle_request, it may freed memory pointed by req,
So do not access member of req after calling this function.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: zhanghailiang
---
hw/block/virtio-blk.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw
Here we don't check the return value of malloc() which may fail.
Use the g_malloc() instead, which will abort the program when
there is not enough memory.
Signed-off-by: zhanghailiang
---
slirp/misc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/slirp/misc.c b/
Pointer 'ch' will be used in function 'l2cap_channel_open_req_msg' after
it was previously freed in 'l2cap_channel_open'.
Assigned it to NULL after it is freed.
Reviewed-by: Alex Bennée
Signed-off-by: zhanghailiang
---
hw/bt/l2cap.c | 2 +-
1 file changed, 1 ins
em:
* Modified the log message according to reviewing suggestion of Michael
Li Liu (3):
tcg: check return value of fopen()
block/vvfat: fix setbuf stream parameter may be NULL
qtest: check the value returned by fopen()
zhanghailiang (7):
l2cap: fix access freed memory
monitor: fix acces
d-off-by: zhanghailiang
---
util/path.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/util/path.c b/util/path.c
index 5c59d9f..e152f2a 100644
--- a/util/path.c
+++ b/util/path.c
@@ -45,8 +45,8 @@ static struct pathelem *new_entry(const char
The function fopen() may fail, so check its return value.
Signed-off-by: zhanghailiang
Signed-off-by: Li Liu
---
tests/bios-tables-test.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 045eb27..28ec28d 100644
--- a/tests/bios
The function monitor_fdset_dup_fd_find_remove() references member of 'mon_fdset'
which may be freed in function monitor_fdset_cleanup()
Reviewed-by: Gonglei
Signed-off-by: zhanghailiang
---
monitor.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/monitor.c b
From: Li Liu
Give a warning message if fopen() failed to open the log file.
Signed-off-by: zhanghailiang
Signed-off-by: Li Liu
---
tcg/tcg.c | 4
1 file changed, 4 insertions(+)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index c068990..8f50d2a 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2406,6
From: Li Liu
fopen() may return NULL which will cause setbuf() segmentfault
Signed-off-by: zhanghailiang
Signed-off-by: Li Liu
---
block/vvfat.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/block/vvfat.c b/block/vvfat.c
index 70176b1..6889ea9 100644
--- a/block
Signed-off-by: zhanghailiang
---
linux-user/syscall.c | 4
1 file changed, 4 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index a50229d..8e5ccf1 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2870,6 +2870,10 @@ static inline abi_long do_msgsnd
copy-ram.c
Hi Dave,
I want to test your patches, but i failed to 'git am' them to the new
qemu-2.1 source. I want to know if you has a git-branch which i can
git clone directly? Thanks.
Best regards,
zhanghailiang
rn, should we munmap testarea?
BTW, i think it is better to use goto statement,
which we can handle the error cases together!
Best regards,
zhanghailiang
+return -1;
+}
+g_assert(((size_t)testarea2& (pagesize-1)) == 0);
+*(char *)testarea = 0; /* Force the map of the new p
ove it to function pc_memory_init.
Signed-off-by: xiexiangyou
Signed-off-by: zhanghailiang
---
hw/i386/pc.c| 8
include/sysemu/sysemu.h | 1 +
vl.c| 10 +-
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/
s net bug first.
Thanks,
zhanghailiang
zhanghailiang (3):
net: forbid dealing with packets when VM is not running
net: Flush queues when runstate changes back to running
virtio-net: Remove checking vm state in virtio_net_can_receive
hw/net/virtio-net.c | 4
include/net/net.h | 2 ++
nction for VMstate change.
When vm changes back to running, we flush all queues in the callback function.
Signed-off-by: zhanghailiang
---
include/net/net.h | 1 +
net/net.c | 26 ++
2 files changed, 27 insertions(+)
diff --git a/include/net/net.h b/include/net/n
twork fault in VM.
To avoid this, do things like virtio-net, and forbid receiving packets
in generic net code when VM is not running.
Signed-off-by: zhanghailiang
---
include/net/net.h | 1 +
net/net.c | 6 ++
2 files changed, 7 insertions(+)
diff --git a/include/net/net.h b/includ
, When the vdev->vm_running is still false.
Actually it depends on the register sequence of callback functions.
Here nic_vmstate_change_handler will called before virtio_vmstate_change.
So remove the unnecessarily checking.
Signed-off-by: zhanghailiang
---
hw/net/virtio-net.c | 4
1 file chan
On 2014/8/13 19:50, Michael S. Tsirkin wrote:
On Wed, Aug 13, 2014 at 07:21:57PM +0800, zhanghailiang wrote:
If we configure qemu with realtime-mlock-on and memory-node-bind at the same
time,
Qemu will fail to start, and mbind() fails with message "Input/output error".
> From
The function fstat() may fail, so check its return value.
Acked-by: Levente Kurusa
Signed-off-by: zhanghailiang
---
hw/misc/ivshmem.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 768e528..2be4b86 100644
--- a/hw/misc
Here we don't check the return value of malloc() which may fail.
Use the g_malloc() instead, which will abort the program when
there is not enough memory.
Signed-off-by: zhanghailiang
Reviewed-by: Alex Bennée
---
slirp/misc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
igned-off-by: zhanghailiang
Reviewed-by: Alex Bennée
---
util/path.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/util/path.c b/util/path.c
index 5c59d9f..e152f2a 100644
--- a/util/path.c
+++ b/util/path.c
@@ -45,8 +45,8 @@ static struct pathelem *new_entry(const char
Signed-off-by: zhanghailiang
Acked-by: Riku Voipio
---
linux-user/syscall.c | 4
1 file changed, 4 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index a50229d..8e5ccf1 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2870,6 +2870,10 @@ static
The function monitor_fdset_dup_fd_find_remove() references member of 'mon_fdset'
which may be freed in function monitor_fdset_cleanup()
Reviewed-by: Gonglei
Signed-off-by: zhanghailiang
---
monitor.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/monitor.c b
In function virtio_blk_handle_request, it may freed memory pointed by req,
So do not access member of req after calling this function.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: zhanghailiang
---
hw/block/virtio-blk.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw
The function fopen() may fail, so check its return value.
Signed-off-by: zhanghailiang
Signed-off-by: Li Liu
Reviewed-by: Alex Bennée
---
tests/bios-tables-test.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 045eb27
From: Li Liu
Give a warning message if fopen() failed to open the log file.
Reviewed-by: Alex Bennée
Signed-off-by: zhanghailiang
Signed-off-by: Li Liu
---
tcg/tcg.c | 4
1 file changed, 4 insertions(+)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index c068990..8f50d2a 100644
--- a/tcg/tcg.c
From: Li Liu
fopen() may return NULL which will cause setbuf() segmentfault
Signed-off-by: zhanghailiang
Signed-off-by: Li Liu
---
block/vvfat.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/block/vvfat.c b/block/vvfat.c
index 70176b1..6889ea9 100644
--- a/block
Pointer 'ch' will be used in function 'l2cap_channel_open_req_msg' after
it was previously freed in 'l2cap_channel_open'.
Assigned it to NULL after it is freed.
Reviewed-by: Alex Bennée
Signed-off-by: zhanghailiang
---
hw/bt/l2cap.c | 2 +-
1 file changed, 1 ins
qemu trivial branch?
Any help will be greatly appreciated.
Thanks,
zhanghailiang
This patch set fix three bugs about accessing freed memory and several api
abuse.
In qemu, there are serveral places that do not check
the return value of fstat()/fopen()/malloc(),etc.
Though it is a small
s ok!
(2) Register a handler function for VMstate change.
When vm changes back to running, we flush all queues in the callback function.
Signed-off-by: zhanghailiang
---
include/net/net.h | 1 +
net/net.c | 26 ++
2 files changed, 27 insertions(+)
diff --git
On 2014/8/14 15:15, Hu Tao wrote:
On Thu, Aug 14, 2014 at 02:31:41PM +0800, zhanghailiang wrote:
On 2014/8/13 19:50, Michael S. Tsirkin wrote:
On Wed, Aug 13, 2014 at 07:21:57PM +0800, zhanghailiang wrote:
If we configure qemu with realtime-mlock-on and memory-node-bind at the same
time
On 2014/8/14 18:31, Michael S. Tsirkin wrote:
On Thu, Aug 14, 2014 at 03:29:17PM +0800, zhanghailiang wrote:
Here we don't check the return value of malloc() which may fail.
Use the g_malloc() instead, which will abort the program when
there is not enough memory.
Signed-off-by: zhanghai
On 2014/8/14 18:32, Michael S. Tsirkin wrote:
On Thu, Aug 14, 2014 at 03:29:19PM +0800, zhanghailiang wrote:
The function fopen() may fail, so check its return value.
Signed-off-by: zhanghailiang
Signed-off-by: Li Liu
Reviewed-by: Alex Bennée
---
tests/bios-tables-test.c | 5 +
1 file
On 2014/8/14 17:56, Michael S. Tsirkin wrote:
On Thu, Aug 14, 2014 at 05:09:00PM +0800, zhanghailiang wrote:
On 2014/8/14 15:15, Hu Tao wrote:
On Thu, Aug 14, 2014 at 02:31:41PM +0800, zhanghailiang wrote:
On 2014/8/13 19:50, Michael S. Tsirkin wrote:
On Wed, Aug 13, 2014 at 07:21:57PM +0800
On 2014/8/14 18:05, Michael S. Tsirkin wrote:
On Thu, Aug 14, 2014 at 02:13:57PM +0800, zhanghailiang wrote:
When the runstate changes back to running, we definitely need to flush
queues to get packets flowing again.
Here we implement this in the net layer:
(1) add a member 'VMChangeState
On 2014/8/14 18:09, Michael S. Tsirkin wrote:
On Thu, Aug 14, 2014 at 02:13:57PM +0800, zhanghailiang wrote:
When the runstate changes back to running, we definitely need to flush
queues to get packets flowing again.
Here we implement this in the net layer:
(1) add a member 'VMChangeState
On 2014/8/14 18:36, Michael S. Tsirkin wrote:
On Thu, Aug 14, 2014 at 03:29:21PM +0800, zhanghailiang wrote:
From: Li Liu
fopen() may return NULL which will cause setbuf() segmentfault
Signed-off-by: zhanghailiang
Signed-off-by: Li Liu
---
block/vvfat.c | 5 -
1 file changed, 4
net_can_receive
Signed-off-by: zhanghailiang
---
hw/net/virtio-net.c | 4
include/net/net.h | 2 ++
net/net.c | 32
3 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 268eff9..287d762
On 2014/8/14 18:31, Michael S. Tsirkin wrote:
On Thu, Aug 14, 2014 at 03:29:17PM +0800, zhanghailiang wrote:
Here we don't check the return value of malloc() which may fail.
Use the g_malloc() instead, which will abort the program when
there is not enough memory.
Signed-off-by: zhanghai
On 2014/8/14 18:15, Michael S. Tsirkin wrote:
On Thu, Aug 14, 2014 at 03:29:16PM +0800, zhanghailiang wrote:
In this file, we don't check the return value of malloc/strdup/realloc which
may fail.
Instead of using these routines, we use the GLib memory APIs
g_malloc/g_strdup/g_realloc.
On 2014/8/16 0:53, Richard Henderson wrote:
On 08/15/2014 05:03 AM, Michael Tokarev wrote:
f = fopen("/tmp/op.log", "w");
Gosh. So why are we still use fixed filenames in /tmp?
Every such use is a potential security holw... :( Ughm.
Can't we get rid of this somehow, by requiring a
In function virtio_blk_handle_request, it may freed memory pointed by req,
So do not access member of req after calling this function.
Reviewed-by: Michael S. Tsirkin
Reviewed-by: Stefan Hajnoczi
Signed-off-by: zhanghailiang
---
hw/block/virtio-blk.c | 3 ++-
1 file changed, 2 insertions
igned-off-by: zhanghailiang
Reviewed-by: Alex Bennée
---
util/path.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/util/path.c b/util/path.c
index 5c59d9f..4e4877e 100644
--- a/util/path.c
+++ b/util/path.c
@@ -45,8 +45,8 @@ static struct pathelem *new_entry(const
Here we don't check the return value of malloc() which may fail.
Use the g_malloc() instead, which will abort the program when
there is not enough memory.
Signed-off-by: zhanghailiang
Reviewed-by: Alex Bennée
---
slirp/misc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
The function fopen() may fail, so check its return value.
Signed-off-by: zhanghailiang
Signed-off-by: Li Liu
Reviewed-by: Alex Bennée
---
tests/bios-tables-test.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 045eb27
fopen() may fail and it does not check its return vaule here,
it is better to dump op count to the normal log file.
Signed-off-by: Li Liu
Signed-off-by: zhanghailiang
---
tcg/tcg.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index c068990
From: Li Liu
fopen() may return NULL which will cause setbuf() segmentfault
Signed-off-by: zhanghailiang
Signed-off-by: Li Liu
---
block/vvfat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/vvfat.c b/block/vvfat.c
index 70176b1..62023e1 100644
--- a/block/vvfat.c
+++ b/block
On 2014/8/18 14:55, Jason Wang wrote:
On 08/18/2014 12:46 PM, zhanghailiang wrote:
For all NICs(except virtio-net) emulated by qemu,
Such as e1000, rtl8139, pcnet and ne2k_pci,
Qemu can still receive packets when VM is not running.
If this happened in *migration's* last PAUSE VM stage,
Th
On 2014/8/18 19:42, Michael Tokarev wrote:
18.08.2014 12:06, Peter Maydell wrote:
On 18 August 2014 09:00, zhanghailiang wrote:
From: Li Liu
fopen() may return NULL which will cause setbuf() segmentfault
Signed-off-by: zhanghailiang
Signed-off-by: Li Liu
---
block/vvfat.c | 1 +
1 file
1 - 100 of 1429 matches
Mail list logo