[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200611081551.14671.dada1@cosmosbay.com>
Date: Wed, 8 Nov 2006 15:51:13 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: Andrew Morton <akpm@...l.org>
Cc: Evgeniy Polyakov <johnpol@....mipt.ru>,
David Miller <davem@...emloft.net>,
Ulrich Drepper <drepper@...hat.com>,
netdev <netdev@...r.kernel.org>,
Zach Brown <zach.brown@...cle.com>,
Christoph Hellwig <hch@...radead.org>,
Chase Venters <chase.venters@...entec.com>,
Johann Borck <johann.borck@...sedata.com>,
linux-kernel@...r.kernel.org, Jeff Garzik <jeff@...zik.org>
Subject: Re: [take23 0/5] kevent: Generic event handling mechanism.
On Wednesday 08 November 2006 09:21, Evgeniy Polyakov wrote:
> On Tue, Nov 07, 2006 at 02:17:18PM -0800, Andrew Morton (akpm@...l.org)
wrote:
> > From: Andrew Morton <akpm@...l.org>
> >
> > If kevent_user_wait() gets -EFAULT on the attempt to copy the first
> > event, it will return 0, which is indistinguishable from "no events
> > pending".
> >
> > It can and should return EFAULT in this case.
>
> Correct, I missed that.
> Thanks Andrew, I will put into my tree, -mm seems to have it already.
I believe eventpoll has a similar problem. Not a big problem, but we can be
cleaner. Normally, the access_ok() done in sys_epoll_wait() should catch non
writeable user area, unless another thread play VM game (the thread in
sys_epoll_wait() can sleep)
[PATCH] eventpoll : In case a fault occurs during copy_to_user(), we should
report the count of events that were successfully copied into user space,
instead of EFAULT. That would be consistent with behavior of read/write()
syscalls for example.
Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
View attachment "eventpoll.patch" of type "text/plain" (424 bytes)
Powered by blists - more mailing lists