diff options
Diffstat (limited to 'sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2005-0736.patch')
-rw-r--r-- | sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2005-0736.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2005-0736.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2005-0736.patch new file mode 100644 index 000000000000..ecf4ccddb98a --- /dev/null +++ b/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2005-0736.patch @@ -0,0 +1,34 @@ +diff -Naru a/fs/eventpoll.c b/fs/eventpoll.c +--- a/fs/eventpoll.c 2005-04-29 17:08:35 -07:00 ++++ b/fs/eventpoll.c 2005-04-29 17:08:35 -07:00 +@@ -619,6 +619,7 @@ + return error; + } + ++#define MAX_EVENTS (INT_MAX / sizeof(struct epoll_event)) + + /* + * Implement the event wait interface for the eventpoll file. It is the kernel +@@ -635,7 +636,7 @@ + current, epfd, events, maxevents, timeout)); + + /* The maximum number of event must be greater than zero */ +- if (maxevents <= 0) ++ if (maxevents <= 0 || maxevents > MAX_EVENTS) + return -EINVAL; + + /* Verify that the area passed by the user is writeable */ +# This is a BitKeeper generated diff -Nru style patch. +# +# ChangeSet +# 2005/03/08 08:18:50-08:00 torvalds@ppc970.osdl.org +# epoll: return proper error on overflow condition +# +# Noted by Georgi Guninski. +# +# fs/eventpoll.c +# 2005/03/08 08:18:40-08:00 torvalds@ppc970.osdl.org +2 -1 +# epoll: return proper error on overflow condition +# +# Noted by Georgi Guninski. +# |