All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Milos Vyletel <milos@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@redhat.com>, Jiri Olsa <jolsa@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Don Zickus <dzickus@redhat.com>,
	"Steven Rostedt (Red Hat)" <rostedt@goodmis.org>,
	"open list:PERFORMANCE EVENT..." <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] perf tools: avoid possible race condition in copyfile
Date: Mon, 8 Jun 2015 11:53:03 -0300	[thread overview]
Message-ID: <20150608145303.GE3136@kernel.org> (raw)
In-Reply-To: <1433775018-19868-1-git-send-email-milos@redhat.com>

Em Mon, Jun 08, 2015 at 04:50:16PM +0200, Milos Vyletel escreveu:
> 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 <path>/.<filename>.XXXXXX where the suffix is
>   used by mkstemp() to create unique file
> - change file mode
> - copy content
> - if successful link temp file to target file
> - unlink temp file

Thanks, applied, will be in my next pull request to Ingo,

- Arnaldo

  reply	other threads:[~2015-06-08 14:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 14:50 [PATCH v2] perf tools: avoid possible race condition in copyfile Milos Vyletel
2015-06-08 14:53 ` Arnaldo Carvalho de Melo [this message]
2015-06-12  8:49 ` [tip:perf/core] perf tools: Avoid possible race condition in copyfile() tip-bot for Milos Vyletel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150608145303.GE3136@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dzickus@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=milos@redhat.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.