From 4eccd99ef7a39afd3005dadc91a80031aca5cbd6 Mon Sep 17 00:00:00 2001 From: Davide Libenzi Date: Tue, 12 May 2009 13:19:44 -0700 Subject: [PATCH] epoll: fix size check in epoll_create() commit bfe3891a5f5d3b78146a45f40e435d14f5ae39dd upstream. Fix a size check WRT the manual pages. This was inadvertently broken by commit 9fe5ad9c8cef9ad5873d8ee55d1cf00d9b607df0 ("flag parameters add-on: remove epoll_create size param"). Signed-off-by: Davide Libenzi Cc: Cc: rohit verma Cc: Ulrich Drepper Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- fs/eventpoll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 011b9b8c90c6..e323e4793afd 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1136,7 +1136,7 @@ error_return: SYSCALL_DEFINE1(epoll_create, int, size) { - if (size < 0) + if (size <= 0) return -EINVAL; return sys_epoll_create1(0); -- 2.39.5