The Samba-Bugzilla – Attachment 16716 Details for
Bug 14769
smbd panic on force-close share during offload write
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for master.
0001-s3-smbd-For-async-FSCTL-calls-add-the-outstanding-te.patch (text/plain), 2.57 KB, created by
Jeremy Allison
on 2021-08-04 19:30:25 UTC
(
hide
)
Description:
git-am fix for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2021-08-04 19:30:25 UTC
Size:
2.57 KB
patch
obsolete
>From 789e71544bfc01c58da2c3bf794742e5f80c604e Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Wed, 4 Aug 2021 09:52:49 -0700 >Subject: [PATCH] s3: smbd: For async FSCTL calls, add the outstanding > tevent_reqs to the aio list on the file handle. > >FSCTL_DUP_EXTENTS_TO_FILE/FSCTL_SRV_COPYCHUNK/FSCTL_SRV_COPYCHUNK_WRITE/FSCTL_SRV_REQUEST_RESUME_KEY >can go async on a file handle - so use the existing aio_add_req_to_fsp() call used in all other aio >code to let the server know to wait on closing these handles until the request completes. > >Can't add tests as these calls depend on optional underlying file system >features, but submitter of the bug confirms this fixes their issue. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14769 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/smbd/smb2_ioctl_filesys.c | 5 +++++ > source3/smbd/smb2_ioctl_network_fs.c | 10 ++++++++++ > 2 files changed, 15 insertions(+) > >diff --git a/source3/smbd/smb2_ioctl_filesys.c b/source3/smbd/smb2_ioctl_filesys.c >index f5c472c2cd1..cea3e7f5478 100644 >--- a/source3/smbd/smb2_ioctl_filesys.c >+++ b/source3/smbd/smb2_ioctl_filesys.c >@@ -768,6 +768,11 @@ struct tevent_req *smb2_ioctl_filesys(uint32_t ctl_code, > tevent_req_set_callback(subreq, > smb2_ioctl_filesys_dup_extents_done, > req); >+ /* Ensure any close request knows about this outstanding IO. */ >+ if (!aio_add_req_to_fsp(state->fsp, req)) { >+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY); >+ return tevent_req_post(req, ev); >+ } > return req; > break; > } >diff --git a/source3/smbd/smb2_ioctl_network_fs.c b/source3/smbd/smb2_ioctl_network_fs.c >index e0beb6c96fe..2acc608799b 100644 >--- a/source3/smbd/smb2_ioctl_network_fs.c >+++ b/source3/smbd/smb2_ioctl_network_fs.c >@@ -641,6 +641,11 @@ struct tevent_req *smb2_ioctl_network_fs(uint32_t ctl_code, > tevent_req_set_callback(subreq, > smb2_ioctl_network_fs_copychunk_done, > req); >+ /* Ensure any close request knows about this outstanding IO. */ >+ if (!aio_add_req_to_fsp(state->fsp, req)) { >+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY); >+ return tevent_req_post(req, ev); >+ } > return req; > break; > case FSCTL_QUERY_NETWORK_INTERFACE_INFO: >@@ -689,6 +694,11 @@ struct tevent_req *smb2_ioctl_network_fs(uint32_t ctl_code, > } > tevent_req_set_callback( > subreq, smb2_ioctl_network_fs_offload_read_done, req); >+ /* Ensure any close request knows about this outstanding IO. */ >+ if (!aio_add_req_to_fsp(state->fsp, req)) { >+ tevent_req_nterror(req, NT_STATUS_NO_MEMORY); >+ return tevent_req_post(req, ev); >+ } > return req; > > default: { >-- >2.30.2 >
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 14769
:
16701
|
16712
|
16716
|
16719
|
16720
|
16729
|
16730