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: samba-4.17.11~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a6964d02650ea123e36b639baaad89ffd4c79e3;p=thirdparty%2Fsamba.git vfs_aio_pthread: don't crash without a pthreadpool During 'samba-tool ntacl sysvolreset' and similar. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15441 Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett (cherry picked from commit 3694f2ce6205a647eb5dab2115785fb45decaf0b) --- 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.