linux-uconsole/include
Jens Axboe eaef83c4c0 eventfd: track eventfd_signal() recursion depth
commit b5e683d5ca upstream.

eventfd use cases from aio and io_uring can deadlock due to circular
or resursive calling, when eventfd_signal() tries to grab the waitqueue
lock. On top of that, it's also possible to construct notification
chains that are deep enough that we could blow the stack.

Add a percpu counter that tracks the percpu recursion depth, warn if we
exceed it. The counter is also exposed so that users of eventfd_signal()
can do the right thing if it's non-zero in the context where it is
called.

Cc: stable@vger.kernel.org # 4.19+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-11 04:34:08 -08:00
..
acpi
asm-generic
clocksource
crypto
drm
dt-bindings
keys
kvm
linux eventfd: track eventfd_signal() recursion depth 2020-02-11 04:34:08 -08:00
math-emu
media
memory
misc
net
pcmcia
ras
rdma
scsi
soc
sound
target
trace
uapi
video
xen