From: Stefan Metzmacher Date: Tue, 2 May 2023 13:15:16 +0000 (+0200) Subject: vfs_aio_pthread: don't crash without a pthreadpool X-Git-Tag: talloc-2.4.1~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3694f2ce6205a647eb5dab2115785fb45decaf0b;p=thirdparty%2Fsamba.git vfs_aio_pthread: don't crash without a pthreadpool During 'samba-tool ntacl sysvolreset' and similar. Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source3/modules/vfs_aio_pthread.c b/source3/modules/vfs_aio_pthread.c index 5d051b4f7da..428ae5f2a4c 100644 --- a/source3/modules/vfs_aio_pthread.c +++ b/source3/modules/vfs_aio_pthread.c @@ -468,6 +468,13 @@ static int aio_pthread_openat_fn(vfs_handle_struct *handle, return -1; } + if (fsp->conn->sconn->pool == NULL) { + /* + * a threadpool is required for async support + */ + aio_allow_open = false; + } + if (fsp->conn->sconn->client->server_multi_channel_enabled) { /* * This module is not compatible with multi channel yet.