Thread (37 messages) 37 messages, 7 authors, 2014-06-27

Re: [PATCH/RFC] Re: recvmmsg() timeout behavior strangeness [RESEND]

From: Chris Friesen <hidden>
Date: 2014-05-28 21:34:57
Also in: linux-man, lkml

On 05/28/2014 01:50 PM, 'Arnaldo Carvalho de Melo' wrote:
What is being discussed here is how to return the EFAULT that may happen
_after_ datagram processing, be it interrupted by an EFAULT, signal, or
plain returning all that was requested, with no errors.

This EFAULT _after_ datagram processing may happen when updating the
remaining timeout, because then how can userspace both receive the
number of successfully copied datagrams (in any of the cases mentioned
in the previous paragraph) and know that that timeout can't be used
because there was a problem while trying to copy it to userspace
(EFAULT)?

How does select() handle this problem?  It updates the timeout and also 
modifies other data.

Could we just check whether the timeout pointer is valid before doing 
anything else?  Of course we could still fault the page out while 
waiting for messages and then fail to fault it back in later, but that 
seems like a not-very-likely scenario.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help