Commit 7cd50e49 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] epoll events send fix

From: Davide Libenzi <davidel@xmailserver.org>

We're now sending epi->event.events while it should be sending
epi->revents.
Signed-off-by: default avatarDavide Libenzi <davidel@xmailserver.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7b90d17f
......@@ -1451,10 +1451,9 @@ static int ep_send_events(struct eventpoll *ep, struct list_head *txlist,
epi->revents = revents & epi->event.events;
if (epi->revents) {
if (__put_user(epi->event.events,
&events[eventcnt].events))
return -EFAULT;
if (__put_user(epi->event.data,
if (__put_user(epi->revents,
&events[eventcnt].events) ||
__put_user(epi->event.data,
&events[eventcnt].data))
return -EFAULT;
if (epi->event.events & EPOLLONESHOT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment