]> git.baikalelectronics.ru Git - kernel.git/commit
epoll: remember the event if epoll_wait returns -EFAULT
authorTony Battersby <tonyb@cybernetics.com>
Tue, 31 Mar 2009 22:24:14 +0000 (15:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Apr 2009 15:59:19 +0000 (08:59 -0700)
commit0cf67e7b0839377b438ac8ec9977bed661a61c3e
treea4dcfea753279e1f8f4e7cc8256a8f5c195341ce
parent355a1ed6e1a2be6137de5c625d12af379b070deb
epoll: remember the event if epoll_wait returns -EFAULT

If epoll_wait returns -EFAULT, the event that was being returned when the
fault was encountered will be forgotten.  This is not a big deal since
EFAULT will happen only if a buggy userspace program passes in a bad
address, in which case what happens later usually doesn't matter.
However, it is easy to remember the event for later, and this patch makes
a simple change to do that.

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Acked-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/eventpoll.c