Eric Dumazet a écrit :
Davide Libenzi a écrit :
Lost forever means? If there are more processes watching some fd
(external events), they all get their own copy of the events in their
own private epoll fd. It's not that we "steal" things out of the
kernel, is not a 1:1 producer/consumer thing (one producer, 1 queue).
It's one producer, broadcast to all listeners (consumers) thing. The
only case where it'd matter is in the case of multiple threads sharing
the same epoll fd.
In my particular epoll application, the producer is tcp stack, and I
have one consumer. If an network event is lost in the EFAULT handling,
its lost forever. In any case, my application do provide a correct user
area, so this problem is only theorical.
I realize I was not explicit, and dit not answer your question (Lost forever
means ?)
if (epi->revents) {
if (__put_user(epi->revents,
&events[eventcnt].events) ||
__put_user(epi->event.data,
&events[eventcnt].data))
return -EFAULT;
>> if (epi->event.events & EPOLLONESHOT)
>> epi->event.events &= EP_PRIVATE_BITS;
eventcnt++;
}
If one EPOLLONESHOT event is correctly copied to user space, its status is
updated.
If other ready events in the same epoll_wait() call cannot be transferred
because of an EFAULT (we reach the real end of user provided area), this
EPOLLONESHOT event is lost forever, because it wont be requeued in ready list.
Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]