aboutsummaryrefslogtreecommitdiffstats
path: root/fs/eventpoll.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-17 11:58:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-17 11:58:04 -0400
commit57a8ec387e1441ea5e1232bc0749fb99a8cba7e7 (patch)
treeb5fb03fc6bc5754de8b5b1f8b0e4f36d67c8315c /fs/eventpoll.c
parent0a8ad0ffa4d80a544f6cbff703bf6394339afcdf (diff)
parent43e11fa2d1d3b6e35629fa556eb7d571edba2010 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton: "VM: - z3fold fixes and enhancements by Henry Burns and Vitaly Wool - more accurate reclaimed slab caches calculations by Yafang Shao - fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by Christoph Hellwig - !CONFIG_MMU fixes by Christoph Hellwig - new novmcoredd parameter to omit device dumps from vmcore, by Kairui Song - new test_meminit module for testing heap and pagealloc initialization, by Alexander Potapenko - ioremap improvements for huge mappings, by Anshuman Khandual - generalize kprobe page fault handling, by Anshuman Khandual - device-dax hotplug fixes and improvements, by Pavel Tatashin - enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V - add pte_devmap() support for arm64, by Robin Murphy - unify locked_vm accounting with a helper, by Daniel Jordan - several misc fixes core/lib: - new typeof_member() macro including some users, by Alexey Dobriyan - make BIT() and GENMASK() available in asm, by Masahiro Yamada - changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better code generation, by Alexey Dobriyan - rbtree code size optimizations, by Michel Lespinasse - convert struct pid count to refcount_t, by Joel Fernandes get_maintainer.pl: - add --no-moderated switch to skip moderated ML's, by Joe Perches misc: - ptrace PTRACE_GET_SYSCALL_INFO interface - coda updates - gdb scripts, various" [ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ] * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits) fs/select.c: use struct_size() in kmalloc() mm: add account_locked_vm utility function arm64: mm: implement pte_devmap support mm: introduce ARCH_HAS_PTE_DEVMAP mm: clean up is_device_*_page() definitions mm/mmap: move common defines to mman-common.h mm: move MAP_SYNC to asm-generic/mman-common.h device-dax: "Hotremove" persistent memory that is used like normal RAM mm/hotplug: make remove_memory() interface usable device-dax: fix memory and resource leak if hotplug fails include/linux/lz4.h: fix spelling and copy-paste errors in documentation ipc/mqueue.c: only perform resource calculation if user valid include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures scripts/gdb: add helpers to find and list devices scripts/gdb: add lx-genpd-summary command drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl kernel/pid.c: convert struct pid count to refcount_t drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining() select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR ...
Diffstat (limited to 'fs/eventpoll.c')
-rw-r--r--fs/eventpoll.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 4c74c768ae43..0f9c073d78d5 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -2313,19 +2313,17 @@ SYSCALL_DEFINE6(epoll_pwait, int, epfd, struct epoll_event __user *, events,
2313 size_t, sigsetsize) 2313 size_t, sigsetsize)
2314{ 2314{
2315 int error; 2315 int error;
2316 sigset_t ksigmask, sigsaved;
2317 2316
2318 /* 2317 /*
2319 * If the caller wants a certain signal mask to be set during the wait, 2318 * If the caller wants a certain signal mask to be set during the wait,
2320 * we apply it here. 2319 * we apply it here.
2321 */ 2320 */
2322 error = set_user_sigmask(sigmask, &ksigmask, &sigsaved, sigsetsize); 2321 error = set_user_sigmask(sigmask, sigsetsize);
2323 if (error) 2322 if (error)
2324 return error; 2323 return error;
2325 2324
2326 error = do_epoll_wait(epfd, events, maxevents, timeout); 2325 error = do_epoll_wait(epfd, events, maxevents, timeout);
2327 2326 restore_saved_sigmask_unless(error == -EINTR);
2328 restore_user_sigmask(sigmask, &sigsaved, error == -EINTR);
2329 2327
2330 return error; 2328 return error;
2331} 2329}
@@ -2338,19 +2336,17 @@ COMPAT_SYSCALL_DEFINE6(epoll_pwait, int, epfd,
2338 compat_size_t, sigsetsize) 2336 compat_size_t, sigsetsize)
2339{ 2337{
2340 long err; 2338 long err;
2341 sigset_t ksigmask, sigsaved;
2342 2339
2343 /* 2340 /*
2344 * If the caller wants a certain signal mask to be set during the wait, 2341 * If the caller wants a certain signal mask to be set during the wait,
2345 * we apply it here. 2342 * we apply it here.
2346 */ 2343 */
2347 err = set_compat_user_sigmask(sigmask, &ksigmask, &sigsaved, sigsetsize); 2344 err = set_compat_user_sigmask(sigmask, sigsetsize);
2348 if (err) 2345 if (err)
2349 return err; 2346 return err;
2350 2347
2351 err = do_epoll_wait(epfd, events, maxevents, timeout); 2348 err = do_epoll_wait(epfd, events, maxevents, timeout);
2352 2349 restore_saved_sigmask_unless(err == -EINTR);
2353 restore_user_sigmask(sigmask, &sigsaved, err == -EINTR);
2354 2350
2355 return err; 2351 return err;
2356} 2352}