All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Andrey Vagin <avagin@openvz.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, stable@kernel.org,
	Pavel Emelyanov <xemul@openvz.org>
Subject: Re: [PATCH 3/3] posix_timer: move copy_to_user(created_timer_id) down in timer_create
Date: Tue, 18 May 2010 16:23:36 +0200	[thread overview]
Message-ID: <20100518142336.GA4818@redhat.com> (raw)
In-Reply-To: <20100518085314.1817d64a@dhcp-lab-109.englab.brq.redhat.com>

On 05/18, Stanislaw Gruszka wrote:
>
> On Mon, 17 May 2010 21:18:08 +0400
> Andrey Vagin <avagin@openvz.org> wrote:
>
> > According to Oleg Nesterov:
> > We can move copy_to_user(created_timer_id) down after
> > "if (timer_event_spec)" block too. (but before CLOCK_DISPATCH(),
> > of course).
>
> I'm not sure what for Oleg want that change, I'm not seeing any value of
> it. I think patch should be dropped.

I didn't mean this change is really needed. I just wanted to clarify
that currently the comment is wrong.

But. Now that we move CLOCK_DISPATCH() down, it becomes correct again:
we report created_timer_id to user-space despite the fact timer_create()
can fail later. This _perhaps_ means it makes sense to preserve the
comment and move the copy_to_user() block down, before CLOCK_DISPATCH(),
just to make the code more readable/understandable.

But I agree with either way you and Andrey prefer. And I believe 2/3
should fix the problem correctly.

Oleg.


  reply	other threads:[~2010-05-18 14:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-17 17:18 [PATCH 1/3] posix_timer: remove wrong comment Andrey Vagin
2010-05-17 17:18 ` [PATCH 2/3] posix_timer: fix error path in timer_create Andrey Vagin
2010-05-17 17:18   ` [PATCH 3/3] posix_timer: move copy_to_user(created_timer_id) down " Andrey Vagin
2010-05-18  6:53     ` Stanislaw Gruszka
2010-05-18 14:23       ` Oleg Nesterov [this message]
2010-05-18  6:49   ` [PATCH 2/3] posix_timer: fix error path " Stanislaw Gruszka
2010-05-20 19:31   ` Andrew Morton
2010-05-20 20:46     ` Thomas Gleixner
2010-05-18  6:49 ` [PATCH 1/3] posix_timer: remove wrong comment Stanislaw Gruszka
  -- strict thread matches above, loose matches on Subject: below --
2010-05-17 13:41 Andrey Vagin
2010-05-17 13:41 ` [PATCH 2/3] posix_timer: fix error path in timer_create Andrey Vagin
2010-05-17 13:41   ` [PATCH 3/3] posix_timer: move copy_to_user(created_timer_id) down " Andrey Vagin

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=20100518142336.GA4818@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sgruszka@redhat.com \
    --cc=stable@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=xemul@openvz.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.