+ epoll-handle-efault-better.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     epoll: handle -EFAULT better
has been added to the -mm tree.  Its filename is
     epoll-handle-efault-better.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: epoll: handle -EFAULT better
From: Eric Dumazet <dada1@xxxxxxxxxxxxx>

In case a fault occurs during copy_to_user(), we should report the count of
events that were successfully copied into user space, instead of EFAULT. 
That would be consistent with behavior of read/write() syscalls for
example.

Signed-off-by: Eric Dumazet <dada1@xxxxxxxxxxxxx>
Cc: Davide Libenzi <davidel@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/eventpoll.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/eventpoll.c~epoll-handle-efault-better fs/eventpoll.c
--- a/fs/eventpoll.c~epoll-handle-efault-better
+++ a/fs/eventpoll.c
@@ -1447,7 +1447,7 @@ static int ep_send_events(struct eventpo
 				       &events[eventcnt].events) ||
 			    __put_user(epi->event.data,
 				       &events[eventcnt].data))
-				return -EFAULT;
+				return eventcnt ? eventcnt : -EFAULT;
 			if (epi->event.events & EPOLLONESHOT)
 				epi->event.events &= EP_PRIVATE_BITS;
 			eventcnt++;
_

Patches currently in -mm which might be from dada1@xxxxxxxxxxxxx are

vmalloc-optimization-cleanup-bugfixes.patch
vmalloc-optimization-cleanup-bugfixes-tweak.patch
epoll-handle-efault-better.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux