[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100518142336.GA4818@redhat.com>
Date: Tue, 18 May 2010 16:23:36 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Stanislaw Gruszka <sgruszka@...hat.com>
Cc: Andrey Vagin <avagin@...nvz.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, stable@...nel.org,
Pavel Emelyanov <xemul@...nvz.org>
Subject: Re: [PATCH 3/3] posix_timer: move copy_to_user(created_timer_id)
down in timer_create
On 05/18, Stanislaw Gruszka wrote:
>
> On Mon, 17 May 2010 21:18:08 +0400
> Andrey Vagin <avagin@...nvz.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists