vfs_io_uring: avoid stack recursion of vfs_io_uring_queue_run()
authorStefan Metzmacher <metze@samba.org>
Fri, 8 May 2020 19:29:53 +0000 (21:29 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 12 May 2020 19:53:45 +0000 (19:53 +0000)
commitf96f45c9ba8d4c8fa4026c22ac4201d66335e5c4
treefb71f4bd1e3793bb559840a7e3e0195bcb709bc4
parent388bc2e6e44470ea4043ecb22750e241145355d2
vfs_io_uring: avoid stack recursion of vfs_io_uring_queue_run()

Instead we remember if recursion was triggered and jump to
the start of the function again from the end.

This should make it safe to be called from the completion_fn().

This is hideously complex stuff, so document the hell
out of it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14361

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_io_uring.c