aboutsummaryrefslogtreecommitdiffstats
path: root/fs/eventpoll.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-26 21:27:40 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:10:07 -0400
commit5e196a9cf557dbc2bf808824c6c4998150e18d06 (patch)
treee0a209f3bc1b8029f461b79557a643c687e4a3ad /fs/eventpoll.c
parentecd188159efa112770d5f8a4a62f8d3586784f48 (diff)
switch epoll_wait(2) to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/eventpoll.c')
-rw-r--r--fs/eventpoll.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index eedec84c1809..567ae72e155d 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1809,7 +1809,7 @@ error_return:
1809SYSCALL_DEFINE4(epoll_wait, int, epfd, struct epoll_event __user *, events, 1809SYSCALL_DEFINE4(epoll_wait, int, epfd, struct epoll_event __user *, events,
1810 int, maxevents, int, timeout) 1810 int, maxevents, int, timeout)
1811{ 1811{
1812 int error; 1812 int error, fput_needed;
1813 struct file *file; 1813 struct file *file;
1814 struct eventpoll *ep; 1814 struct eventpoll *ep;
1815 1815
@@ -1825,7 +1825,7 @@ SYSCALL_DEFINE4(epoll_wait, int, epfd, struct epoll_event __user *, events,
1825 1825
1826 /* Get the "struct file *" for the eventpoll file */ 1826 /* Get the "struct file *" for the eventpoll file */
1827 error = -EBADF; 1827 error = -EBADF;
1828 file = fget(epfd); 1828 file = fget_light(epfd, &fput_needed);
1829 if (!file) 1829 if (!file)
1830 goto error_return; 1830 goto error_return;
1831 1831
@@ -1847,7 +1847,7 @@ SYSCALL_DEFINE4(epoll_wait, int, epfd, struct epoll_event __user *, events,
1847 error = ep_poll(ep, events, maxevents, timeout); 1847 error = ep_poll(ep, events, maxevents, timeout);
1848 1848
1849error_fput: 1849error_fput:
1850 fput(file); 1850 fput_light(file, fput_needed);
1851error_return: 1851error_return:
1852 1852
1853 return error; 1853 return error;