Jens Axboe b5e683d5ca eventfd: track eventfd_signal() recursion depth
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>
2020-02-03 17:27:38 -07:00
..
2020-01-28 15:18:23 -08:00
\n
2019-11-30 11:16:07 -08:00
2020-01-29 15:25:34 -08:00
2020-01-28 15:31:03 -08:00
2019-12-05 13:20:11 -08:00
2019-12-14 11:13:54 -08:00
2020-01-14 13:28:28 -08:00
2019-12-01 14:00:59 -08:00
2019-11-30 10:44:49 -08:00
2020-01-29 19:38:34 -08:00
2020-01-29 18:53:37 -08:00
2019-12-08 14:37:36 +01:00