The Samba-Bugzilla – Attachment 16055 Details for
Bug 14301
smbd panic on force-close share during async io
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
supplemental git-am fix for 4.12.x
0001-s3-smbd-Allow-a-SHUTDOWN_CLOSE-on-a-file-with-outsta.patch (text/plain), 1.38 KB, created by
Jeremy Allison
on 2020-06-17 21:48:46 UTC
(
hide
)
Description:
supplemental git-am fix for 4.12.x
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2020-06-17 21:48:46 UTC
Size:
1.38 KB
patch
obsolete
>From 333ae95db0040e894dc6abc59f992c5e3502abea Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 16 Jun 2020 15:01:49 -0700 >Subject: [PATCH] s3: smbd: Allow a SHUTDOWN_CLOSE on a file with outstanding > aio if there are no client connections alive. > >The process is exiting now so pthreads will never complete to cause >problems. > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/smbd/close.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > >diff --git a/source3/smbd/close.c b/source3/smbd/close.c >index d5af62a277c..d20e0d258d8 100644 >--- a/source3/smbd/close.c >+++ b/source3/smbd/close.c >@@ -645,6 +645,26 @@ static void assert_no_pending_aio(struct files_struct *fsp, > return; > } > >+ if (close_type == SHUTDOWN_CLOSE) { >+ /* >+ * Check for an active client connection. >+ * If there is none we're shutting down >+ * (calling exit()) and can ignore all outstanding aio. >+ */ >+ struct smbXsrv_client *client = global_smbXsrv_client; >+ struct smbXsrv_connection *xconn = client->connections; >+ bool active_transport = false; >+ >+ for (; xconn != NULL; xconn = xconn->next) { >+ if (NT_STATUS_IS_OK(xconn->transport.status)) { >+ active_transport = true; >+ } >+ } >+ if (!active_transport) { >+ return; >+ } >+ } >+ > DBG_ERR("fsp->num_aio_requests=%u\n", num_requests); > smb_panic("can not close with outstanding aio requests"); > return; >-- >2.20.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14301
:
15825
|
15837
|
15844
|
15847
|
15854
|
15858
|
15861
|
15867
|
15870
|
16043
|
16044
|
16054
|
16055
|
16064
|
16065
|
16069
|
16091