summaryrefslogtreecommitdiff
path: root/fs/eventpoll.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/eventpoll.c')
-rw-r--r--fs/eventpoll.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index db4365f8a75c..c806a0c4383c 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1054,8 +1054,10 @@ static int ep_send_events_proc(struct eventpoll *ep, struct list_head *head,
*/
if (revents) {
if (__put_user(revents, &uevent->events) ||
- __put_user(epi->event.data, &uevent->data))
+ __put_user(epi->event.data, &uevent->data)) {
+ list_add(&epi->rdllink, head);
return eventcnt ? eventcnt : -EFAULT;
+ }
eventcnt++;
uevent++;
if (epi->event.events & EPOLLONESHOT)