vfs_io_uring: avoid stack recursion of vfs_io_uring_queue_run()
commit2ab5eaebc4c6f7bbffc35aa592f8aa09c8246f2d
authorStefan Metzmacher <metze@samba.org>
Fri, 8 May 2020 19:29:53 +0000 (8 21:29 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 14 May 2020 07:25:45 +0000 (14 07:25 +0000)
treeab0caefb78c728f868db780f39de6f670956abd7
parentefdcf63d939c5ab4dd426c97e39c984ec39cb82e
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>
(cherry picked from commit f96f45c9ba8d4c8fa4026c22ac4201d66335e5c4)
source3/modules/vfs_io_uring.c