Re: [RESEND PATCH 1/3] epoll: Extract epoll_wait_do and epoll_pwait_do

2015-01-08 Thread Alexei Starovoitov
On Thu, Jan 8, 2015 at 1:16 AM, Fam Zheng wrote: > + if (!timeout || (timeout->tv_nsec == 0 && timeout->tv_sec == 0)) { .. > + } else if (timeout->tv_nsec >= 0 && timeout->tv_sec >= 0) { the check for tv_nsec is not enough, which points to the fragility of passing user timespec around

[RESEND PATCH 1/3] epoll: Extract epoll_wait_do and epoll_pwait_do

2015-01-08 Thread Fam Zheng
In preparation of epoll_pwait1, this allows sharing code with coming new syscall. The new functions use timespec for timeout. Signed-off-by: Fam Zheng --- fs/eventpoll.c | 136 + 1 file changed, 70 insertions(+), 66 deletions(-) diff --git