]> git.hungrycats.org Git - linux/commit
[PATCH] ia64: sys_ia32.c fix for epoll
authorJanet Morgan <janetmor@us.ibm.com>
Wed, 8 Oct 2003 10:45:05 +0000 (03:45 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 8 Oct 2003 10:45:05 +0000 (03:45 -0700)
commitfd61c73e4cc1a4338a4de39b1c4b4b2d51499390
treeef3c3822677f8d14477f4ed18dbec7e959c087a3
parent6853823b1e5861cf0efba0b25d1a2259fe8954c2
[PATCH] ia64: sys_ia32.c fix for epoll

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.
arch/ia64/ia32/sys_ia32.c