Re: [Qemu-devel] [PATCH 1/2] qemu-file: fix flaws of qemu_put_compression_data

2015-12-06 Thread Li, Liang Z
> On Fri, Dec 04, 2015 at 11:52:07AM +0800, Liang Li wrote: > > There are some flaws in qemu_put_compression_data, this patch tries to > > fix it. Now it can be used by other code. > > > > Signed-off-by: Liang Li > > --- > > migration/qemu-file.c | 10 +- > > 1 file changed, 9 insertions(

Re: [Qemu-devel] [PATCH 1/2] qemu-file: fix flaws of qemu_put_compression_data

2015-12-06 Thread Stefan Hajnoczi
On Fri, Dec 04, 2015 at 11:52:07AM +0800, Liang Li wrote: > There are some flaws in qemu_put_compression_data, this patch tries > to fix it. Now it can be used by other code. > > Signed-off-by: Liang Li > --- > migration/qemu-file.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(

Re: [Qemu-devel] [PATCH 1/2] qemu-file: fix flaws of qemu_put_compression_data

2015-12-06 Thread Stefan Hajnoczi
On Fri, Dec 04, 2015 at 11:52:07AM +0800, Liang Li wrote: > There are some flaws in qemu_put_compression_data, this patch tries > to fix it. Now it can be used by other code. This commit description is vague and doesn't explain what this patch does or why it is necessary. Please try to cover "wha

Re: [Qemu-devel] [PATCH 1/2] qemu-file: fix flaws of qemu_put_compression_data

2015-12-06 Thread Li, Liang Z
> >> - blen could still be smaller that compressBound(size), you need to > >> recheck > >> - blen could have changed, but you don't take that in account for the > >> following caller. > >> > >> So, I think code has a bug? > > > > Yes, there is a bug, I should consider the case QEMUFile with emp

Re: [Qemu-devel] [PATCH 1/2] qemu-file: fix flaws of qemu_put_compression_data

2015-12-04 Thread Juan Quintela
"Li, Liang Z" wrote: >> > There are some flaws in qemu_put_compression_data, this patch tries to >> > fix it. Now it can be used by other code. >> > >> > Signed-off-by: Liang Li >> > --- >> > migration/qemu-file.c | 10 +- >> > 1 file changed, 9 insertions(+), 1 deletion(-) >> > >> > dif

Re: [Qemu-devel] [PATCH 1/2] qemu-file: fix flaws of qemu_put_compression_data

2015-12-04 Thread Li, Liang Z
> On (Fri) 04 Dec 2015 [11:53:09], Liang Li wrote: > > There are some flaws in qemu_put_compression_data, this patch tries to > > fix it. Now it can be used by other code. > > Can you please write a better description here? What are the flaws? > What is being fixed? What other users, and how is

Re: [Qemu-devel] [PATCH 1/2] qemu-file: fix flaws of qemu_put_compression_data

2015-12-04 Thread Li, Liang Z
> > There are some flaws in qemu_put_compression_data, this patch tries to > > fix it. Now it can be used by other code. > > > > Signed-off-by: Liang Li > > --- > > migration/qemu-file.c | 10 +- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/migration/qemu-file.c

Re: [Qemu-devel] [PATCH 1/2] qemu-file: fix flaws of qemu_put_compression_data

2015-12-04 Thread Amit Shah
On (Fri) 04 Dec 2015 [11:53:09], Liang Li wrote: > There are some flaws in qemu_put_compression_data, this patch tries > to fix it. Now it can be used by other code. Can you please write a better description here? What are the flaws? What is being fixed? What other users, and how is it now safer

Re: [Qemu-devel] [PATCH 1/2] qemu-file: fix flaws of qemu_put_compression_data

2015-12-04 Thread Juan Quintela
Liang Li wrote: > There are some flaws in qemu_put_compression_data, this patch tries > to fix it. Now it can be used by other code. > > Signed-off-by: Liang Li > --- > migration/qemu-file.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/migration/qemu-file.c

[Qemu-devel] [PATCH 1/2] qemu-file: fix flaws of qemu_put_compression_data

2015-12-03 Thread Liang Li
There are some flaws in qemu_put_compression_data, this patch tries to fix it. Now it can be used by other code. Signed-off-by: Liang Li --- migration/qemu-file.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index 0bb

[Qemu-devel] [PATCH 1/2] qemu-file: fix flaws of qemu_put_compression_data

2015-12-03 Thread Liang Li
There are some flaws in qemu_put_compression_data, this patch tries to fix it. Now it can be used by other code. Signed-off-by: Liang Li --- migration/qemu-file.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index 0bb