diff options
author | Gordon Ross <gwr@racktopsystems.com> | 2022-07-10 21:37:04 -0400 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-09-23 22:54:59 +0300 |
commit | 088ae41ea793fc92f1e949ea035e6d896025acb4 (patch) | |
tree | 22885c7b887ced546b566f96f70c13fb3a13c5d4 /usr | |
parent | bbcfe1fdf407bba4db5c2e62a69b67be0c4cb443 (diff) | |
download | illumos-gate-088ae41ea793fc92f1e949ea035e6d896025acb4.tar.gz |
14989 SMB panic running smbtorture smb2.durable-open.delete_on_close1
Reviewed-by: Jerry Jelinek <gjelinek@racktopsystems.com>
Reviewed-by: Garrett D'Amore <gdamore@damore.org>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Sam Zaydel <szaydel@racktopsystems.com>
Reviewed by: Gordon Ross <Gordon.W.Ross@gmail.com>
Reviewed by: Matt Barden <mbarden@tintri.com>
Approved by: Dan McDonald <danmcd@mnx.io>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_common_open.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_ofile.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/smbsrv/smb_common_open.c b/usr/src/uts/common/fs/smbsrv/smb_common_open.c index 59c892ee88..a4b572ad28 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_common_open.c +++ b/usr/src/uts/common/fs/smbsrv/smb_common_open.c @@ -834,6 +834,8 @@ smb_common_open(smb_request_t *sr) * smb2.durable-open.delete_on_close1 */ DTRACE_PROBE1(node_deleted, smb_node_t, fnode); + tree_fid = of->f_fid; + of->f_fid = 0; smb_ofile_free(of); of = NULL; last_comp_found = B_FALSE; diff --git a/usr/src/uts/common/fs/smbsrv/smb_ofile.c b/usr/src/uts/common/fs/smbsrv/smb_ofile.c index d3f2bad47c..59a3900513 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_ofile.c +++ b/usr/src/uts/common/fs/smbsrv/smb_ofile.c @@ -405,6 +405,8 @@ smb_ofile_open( smb_node_t *node = of->f_node; ASSERT(of->f_state == SMB_OFILE_STATE_ALLOC); + ASSERT(of->f_fid != 0); + of->f_state = SMB_OFILE_STATE_OPEN; switch (of->f_ftype) { |