summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-05-21 15:26:55 +0200
committerKarolin Seeger <kseeger@samba.org>2019-06-13 08:52:29 +0000
commitebe505e7cf72587640ef69bc04a0710f26bb90b9 (patch)
treef07ff78b63fd51ff05c13f6dd10541450e24d18e /selftest
parentbec45189777316ebf93d50c89d8b02ca46102660 (diff)
downloadsamba-ebe505e7cf72587640ef69bc04a0710f26bb90b9.tar.gz
smbd: Fix a panic
Opening a file with a stale (smbd died) LEVEL_II oplock makes vfs_set_filelen-> ... ->contend_level2_oplocks_begin_default trigger the immediate leading to do_break_to_none. This goes through because fsp->oplock_type is not initialized yet, thus 0. Also, file_has_read_oplocks is still valid, because the smbd that has died could not clean up the brlock.tdb entry. Later in the code the exclusive oplock is granted, which is then found by do_break_to_none, making it panic. This patch just runs the direct FTRUNCATE instead of vfs_set_filelen. This means the contend_level2_oplock code is skipped. The relevant break (LEVEL_II to NONE) is now done in delay_for_oplock() with the nice effect of removing a comment that was very confusing to me. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13957 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed May 22 20:09:29 UTC 2019 on sn-devel-184
Diffstat (limited to 'selftest')
-rw-r--r--selftest/knownfail1
1 files changed, 0 insertions, 1 deletions
diff --git a/selftest/knownfail b/selftest/knownfail
index 6d0fa0b5166..1817db384e0 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -175,7 +175,6 @@
^samba3.smb2.dir.modify
^samba3.smb2.oplock.batch20
^samba3.smb2.oplock.stream1
-^samba3.smb2.oplock.levelii502
^samba3.smb2.streams.rename
^samba3.smb2.streams.rename2
^samba3.smb2.streams.attributes