From: Jeremy Allison Date: Tue, 19 Sep 2023 21:36:45 +0000 (-0700) Subject: s3: smbd: Ensure we remove any pending aio values for named pipes on forced shutdown. X-Git-Tag: tevent-0.16.0~534 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11280f1705c0faa1729f5aeaa1b6a1f79ab5a199;p=thirdparty%2Fsamba.git s3: smbd: Ensure we remove any pending aio values for named pipes on forced shutdown. Matches file and directory closes. Remove knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15423 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Sep 20 02:43:18 UTC 2023 on atb-devel-224 --- diff --git a/selftest/knownfail.d/smb2_pipe_read_async_disconnect b/selftest/knownfail.d/smb2_pipe_read_async_disconnect deleted file mode 100644 index 342a308adec..00000000000 --- a/selftest/knownfail.d/smb2_pipe_read_async_disconnect +++ /dev/null @@ -1 +0,0 @@ -^samba3.smbtorture_s3.plain.SMB2-PIPE-READ-ASYNC-DISCONNECT.check_panic\(fileserver\) diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 2b180e0c718..af5e78daa10 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -1630,6 +1630,14 @@ NTSTATUS close_file_smb(struct smb_request *req, SMB_ASSERT(fsp->stream_fsp == NULL); if (fsp->fake_file_handle != NULL) { + /* + * Named pipes are opened as fake files and + * can have pending aio requests. Ensure + * we clear out all pending aio on force + * shutdown of named pipes also. + * BUG: https://bugzilla.samba.org/show_bug.cgi?id=15423 + */ + assert_no_pending_aio(fsp, close_type); status = close_fake_file(req, fsp); } else if (fsp->print_file != NULL) { /* FIXME: return spool errors */