Re: [Qemu-devel] [PATCH] block: Don't forget to delete temporary file

2012-09-14 Thread Stefan Hajnoczi
On Tue, Sep 11, 2012 at 12:23:37PM +0200, Kevin Wolf wrote: > Am 05.09.2012 15:26, schrieb riegama...@gmail.com: > > From: Dunrong Huang > > > > The caller would not delete temporary file after failed get_tmp_filename(). > > > > Signed-off-by: Dunrong Huang > > Thanks, applied to the block bra

Re: [Qemu-devel] [PATCH] block: Don't forget to delete temporary file

2012-09-11 Thread Kevin Wolf
Am 05.09.2012 15:26, schrieb riegama...@gmail.com: > From: Dunrong Huang > > The caller would not delete temporary file after failed get_tmp_filename(). > > Signed-off-by: Dunrong Huang Thanks, applied to the block branch. Kevin

Re: [Qemu-devel] [PATCH] block: Don't forget to delete temporary file

2012-09-05 Thread Dunrong Huang
2012/9/6 Eric Blake : > On 09/05/2012 10:23 AM, Paolo Bonzini wrote: >> And finally, the whole get_tmp_filename is unsafe because there is a >> race window between closing and reopening the file, if the directory is >> writable and does not have the sticky bit. >> >> So the patch is an improvement,

Re: [Qemu-devel] [PATCH] block: Don't forget to delete temporary file

2012-09-05 Thread Eric Blake
On 09/05/2012 10:23 AM, Paolo Bonzini wrote: > And finally, the whole get_tmp_filename is unsafe because there is a > race window between closing and reopening the file, if the directory is > writable and does not have the sticky bit. > > So the patch is an improvement, but there is still somethin

Re: [Qemu-devel] [PATCH] block: Don't forget to delete temporary file

2012-09-05 Thread Paolo Bonzini
Il 05/09/2012 18:02, Markus Armbruster ha scritto: > Paolo Bonzini writes: > >> Il 05/09/2012 15:26, riegama...@gmail.com ha scritto: >>> From: Dunrong Huang >>> >>> The caller would not delete temporary file after failed get_tmp_filename(). >>> >>> Signed-off-by: Dunrong Huang >>> --- >>> blo

Re: [Qemu-devel] [PATCH] block: Don't forget to delete temporary file

2012-09-05 Thread Markus Armbruster
Paolo Bonzini writes: > Il 05/09/2012 15:26, riegama...@gmail.com ha scritto: >> From: Dunrong Huang >> >> The caller would not delete temporary file after failed get_tmp_filename(). >> >> Signed-off-by: Dunrong Huang >> --- >> block.c | 6 +- >> 1 个文件被修改,插入 5 行(+),删除 1 行(-) >> >> diff

Re: [Qemu-devel] [PATCH] block: Don't forget to delete temporary file

2012-09-05 Thread Dunrong Huang
Hi, thanks for you reply. 2012/9/5 Paolo Bonzini : > Il 05/09/2012 15:26, riegama...@gmail.com ha scritto: >> From: Dunrong Huang >> >> The caller would not delete temporary file after failed get_tmp_filename(). >> >> Signed-off-by: Dunrong Huang >> --- >> block.c | 6 +- >> 1 个文件被修改,插入 5 行(

Re: [Qemu-devel] [PATCH] block: Don't forget to delete temporary file

2012-09-05 Thread Paolo Bonzini
Il 05/09/2012 15:26, riegama...@gmail.com ha scritto: > From: Dunrong Huang > > The caller would not delete temporary file after failed get_tmp_filename(). > > Signed-off-by: Dunrong Huang > --- > block.c | 6 +- > 1 个文件被修改,插入 5 行(+),删除 1 行(-) > > diff --git a/block.c b/block.c > index 07

[Qemu-devel] [PATCH] block: Don't forget to delete temporary file

2012-09-05 Thread riegamaths
From: Dunrong Huang The caller would not delete temporary file after failed get_tmp_filename(). Signed-off-by: Dunrong Huang --- block.c | 6 +- 1 个文件被修改,插入 5 行(+),删除 1 行(-) diff --git a/block.c b/block.c index 074987e..2bc9f75 100644 --- a/block.c +++ b/block.c @@ -433,7 +433,11 @@ int g