From e51ce47b1158e8424eee314ca2f3731881355eec Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 17 Apr 2014 14:33:59 +0000 Subject: epoll_ctl: fix EPOLL_CTL_DEL argument decoding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * desc.c (sys_epoll_ctl): Do not parse the event structure for EPOLL_CTL_DEL operation. Reported-by: Марк Коренберг --- desc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/desc.c b/desc.c index 0686bf4..a180f88 100644 --- a/desc.c +++ b/desc.c @@ -731,11 +731,15 @@ sys_epoll_ctl(struct tcb *tcp) else { #ifdef HAVE_SYS_EPOLL_H struct epoll_event ev; - if (umove(tcp, tcp->u_arg[3], &ev) == 0) + if ( +#ifdef EPOLL_CTL_DEL + (tcp->u_arg[1] != EPOLL_CTL_DEL) && +#endif + umove(tcp, tcp->u_arg[3], &ev) == 0) print_epoll_event(&ev); else #endif - tprints("{...}"); + tprintf("%lx", tcp->u_arg[3]); } } return 0; -- cgit v1.2.3