Re: [PATCH] perf tools: avoid possible race condition in copyfile

2015-06-08 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 08, 2015 at 03:58:43PM +0200, Milos Vyletel escreveu: > On Mon, Jun 08, 2015 at 10:39:57AM -0300, Arnaldo Carvalho de Melo wrote: > > Can you please try applying it on tip/perf/core instead? I think it is > > clashing with: > > commit 9c9f5a2f1944e8b6bf2b618d04b31e1c1760637e > > Author

Re: [PATCH] perf tools: avoid possible race condition in copyfile

2015-06-08 Thread Milos Vyletel
On Mon, Jun 08, 2015 at 10:39:57AM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Jun 04, 2015 at 11:11:00AM +0200, Ingo Molnar escreveu: > > * Milos Vyletel wrote: > > > On top of that slow_copyfile no longer needs to deal with file mode when > > > creating file since temporary file is already

Re: [PATCH] perf tools: avoid possible race condition in copyfile

2015-06-08 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 04, 2015 at 11:11:00AM +0200, Ingo Molnar escreveu: > * Milos Vyletel wrote: > > On top of that slow_copyfile no longer needs to deal with file mode when > > creating file since temporary file is already created and mode is set. > > > > Signed-off-by: Milos Vyletel > > Ok, that look

Re: [PATCH] perf tools: avoid possible race condition in copyfile

2015-06-04 Thread Milos Vyletel
On Thu, Jun 04, 2015 at 11:11:00AM +0200, Ingo Molnar wrote: > > * Milos Vyletel wrote: > > > Use unique temporary files when copying to buildid dir to prevent races > > in case multiple instances are trying to copy same file. This is done by > > > > - creating template in form /..XX where

Re: [PATCH] perf tools: avoid possible race condition in copyfile

2015-06-04 Thread Ingo Molnar
* Milos Vyletel wrote: > Use unique temporary files when copying to buildid dir to prevent races > in case multiple instances are trying to copy same file. This is done by > > - creating template in form /..XX where the suffix is > used by mkstemp() to create unique file > - change file m

[PATCH] perf tools: avoid possible race condition in copyfile

2015-06-04 Thread Milos Vyletel
Use unique temporary files when copying to buildid dir to prevent races in case multiple instances are trying to copy same file. This is done by - creating template in form /..XX where the suffix is used by mkstemp() to create unique file - change file mode - copy content - if successful lin