In source3/locking/brlock.c we have: /**************************************************************************** Check if an unlock overlaps a pending lock. ****************************************************************************/ static bool brl_pending_overlap(const struct lock_struct *lock, const struct lock_struct *pend_lock) { if ((lock->start <= pend_lock->start) && (lock->start + lock->size > pend_lock->start)) return True; if ((lock->start >= pend_lock->start) && (lock->start <= pend_lock->start + pend_lock->size)) return True; return False; } Consider: lock = start=110,size=10 pend_lock = 100, size=10 Should not overlap. However, (lock->start <= pend_lock->start + pend_lock->size) 110 100 10 is true, so it returns true (overlap). lock->start <= pend_lock->start + pend_lock->size should be: lock->start < pend_lock->start + pend_lock->size instead. Patch to follow. This wasn't noticed before as it only causes spurious wakeups which do no harm. Found when developing the torture test for bug 10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout.
Created attachment 10062 [details] git-am fix for master. Applies cleanly to 4.0.next and 4.1.next also. Jeremy.
Comment on attachment 10062 [details] git-am fix for master. pushed to autobuild
Re-assigning to Karolin for inclusion in 4.1.next, 4.0.next. Patch applies cleanly to both branches. Jeremy.
(In reply to comment #3) > Re-assigning to Karolin for inclusion in 4.1.next, 4.0.next. Patch applies > cleanly to both branches. > > Jeremy. Pushed to autobuild-v4-[0|1]-test.
(In reply to comment #4) > (In reply to comment #3) > > Re-assigning to Karolin for inclusion in 4.1.next, 4.0.next. Patch applies > > cleanly to both branches. > > > > Jeremy. > > Pushed to autobuild-v4-[0|1]-test. Pushed to both branches. Closing out bug report. Thanks!