[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CC5F478.40109@microgate.com>
Date: Mon, 25 Oct 2010 15:19:52 -0600
From: Paul Fulghum <paulkf@...rogate.com>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: Alan Cox <alan@...rguk.ukuu.org.uk>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Greg KH <greg@...ah.com>, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] n_hdlc fix read and write locking
On 10/25/2010 2:05 PM, Andrew Morton wrote:
> And a signed-off-by:, please.
OK
> It's not a bug afaict, but beware that a copy_to_user() will
> unconditionally flip this task back into TASK_RUNNING state if it takes
> a pagefault. This means that the below schedule() will fall straight
> through. It looks like the code will handle this correctly? If so,
> it's just a little suboptimal.
copy_to_user is only called when data is available to
complete the read and break terminates the loop without
calling schedule().
>> + set_current_state(TASK_RUNNING);
>
> We normally use __set_current_state() here - it saves a few cycles.
I'll change it to __set_current_state() and resubmit.
--
Paul Fulghum
MicroGate Systems, Ltd.
=Customer Driven, by Design=
(800)444-1982
(512)345-7791 (Direct)
(512)343-9046 (Fax)
Central Time Zone (GMT -6h)
www.microgate.com
--
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