Pull io_uring updates from Jens Axboe: "Some later fixes for io_uring: - Small cleanup series from Pavel - Belt and suspenders build time check of sqe size and layout (Stefan) - Addition of ->show_fdinfo() on request of Jann Horn, to aid in understanding mapped personalities - eventfd recursion/deadlock fix, for both io_uring and aio - Fixup for send/recv handling - Fixup for double deferral of read/write request - Fix for potential double completion event for close request - Adjust fadvise advice async/inline behavior - Fix for shutdown hang with SQPOLL thread - Fix for potential use-after-free of fixed file table" * tag 'io_uring-5.6-2020-02-05' of git://git.kernel.dk/linux-block: io_uring: cleanup fixed file data table references io_uring: spin for sq thread to idle on shutdown aio: prevent potential eventfd recursion on poll io_uring: put the flag changing code in the same spot io_uring: iterate req cache backwards io_uring: punt even fadvise() WILLNEED to async context io_uring: fix sporadic double CQE entry for close io_uring: remove extra ->file check io_uring: don't map read/write iovec potentially twice io_uring: use the proper helpers for io_send/recv io_uring: prevent potential eventfd recursion on poll eventfd: track eventfd_signal() recursion depth io_uring: add BUILD_BUG_ON() to assert the layout of struct io_uring_sqe io_uring: add ->show_fdinfo() for the io_uring file descriptor
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -12,6 +12,8 @@ · 11 unmodified lines | ||
| 12 | 12 | #include <linux/fcntl.h> |
| 13 | 13 | #include <linux/wait.h> |
| 14 | 14 | #include <linux/err.h> |
| 15 | +#include <linux/percpu-defs.h> | |
| 16 | +#include <linux/percpu.h> | |
| 15 | 17 | |
| 16 | 18 | /* |
| 17 | 19 | * CAREFUL: Check include/uapi/asm-generic/fcntl.h when defining |
| @@ -40,6 +42,13 @@ __u64 eventfd_signal(struct eventfd_ctx *ctx, __u64 n); · 22 unmodified lines | ||
| 40 | 42 | int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_entry_t *wait, |
| 41 | 43 | __u64 *cnt); |
| 42 | 44 | |
| 45 | +DECLARE_PER_CPU(int, eventfd_wake_count); | |
| 46 | + | |
| 47 | +static inline bool eventfd_signal_count(void) | |
| 48 | +{ | |
| 49 | + return this_cpu_read(eventfd_wake_count); | |
| 50 | +} | |
| 51 | + | |
| 43 | 52 | #else /* CONFIG_EVENTFD */ |
| 44 | 53 | |
| 45 | 54 | /* |
| @@ -68,6 +77,11 @@ static inline int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, · 22 unmodified lines | ||
| 68 | 77 | return -ENOSYS; |
| 69 | 78 | } |
| 70 | 79 | |
| 80 | +static inline bool eventfd_signal_count(void) | |
| 81 | +{ | |
| 82 | + return false; | |
| 83 | +} | |
| 84 | + | |
| 71 | 85 | #endif |
| 72 | 86 | |
| 73 | 87 | #endif /* _LINUX_EVENTFD_H */ |