From cf7a0c9d754c0f5e0888fc9023e9a863e2f366a3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 2 May 2023 15:15:16 +0200 Subject: [PATCH] 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) --- source3/modules/vfs_aio_pthread.c | 7 +++++++ 1 file changed, 7 insertions(+) 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. -- 2.47.3