• Janet Morgan's avatar
    [PATCH] ia64: sys_ia32.c fix for epoll · fd61c73e
    Janet Morgan authored
    I ran into some bugs testing epoll in ia32-emulation mode on ia64.
    The attached patch fixes the problems and is well tested.
    Here is a summary of the changes:
    
    Changes to sys32_epoll_ctl() and sys32_epoll_wait():
    - changed epoll_event32.data to an array (this is subjective, but seems
    to make the code more readable)
    
    Changes to sys32_epoll_wait():
    - added call to __get_free_pages if kmalloc(epoll_event array) fails.  This
      provides needed scalability and fixes the -ENOMEM failure during
    epoll-pipetest.
    - deleted copy-in of epoll_event array since this is not a user-inputsyscall
    - changed to check numevents > 0 as indicator of success on call to
      sys_epoll_wait.
    - changed to loop on numevents not maxevents when copying out to userspace.
    fd61c73e
sys_ia32.c 82.6 KB