summaryrefslogtreecommitdiff
path: root/source3/locking/locking.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/locking/locking.c')
-rw-r--r--source3/locking/locking.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 8692001f44..e4d06b8bfd 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -937,6 +937,14 @@ BOOL is_valid_share_mode_entry(const struct share_mode_entry *e)
{
int num_props = 0;
+ if (e->op_type == UNUSED_SHARE_MODE_ENTRY) {
+ /* cope with dead entries from the process not
+ existing. These should not be considered valid,
+ otherwise we end up doing zero timeout sharing
+ violation */
+ return False;
+ }
+
num_props += ((e->op_type == NO_OPLOCK) ? 1 : 0);
num_props += (EXCLUSIVE_OPLOCK_TYPE(e->op_type) ? 1 : 0);
num_props += (LEVEL_II_OPLOCK_TYPE(e->op_type) ? 1 : 0);