s3: smbd: Locking - re-add pending lock records if we fail to acquire a lock (and...
authorJeremy Allison <jra@samba.org>
Thu, 3 Jul 2014 03:51:24 +0000 (20:51 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 3 Jul 2014 19:41:12 +0000 (21:41 +0200)
commit954401f8b2b16b3e2ef9655e8ce94d657becce36
treedc6c260d8705b9e36b3c3dacb3e929b154cdb216
parentcc9de6eb091159a84228b988c49261c46c301233
s3: smbd: Locking - re-add pending lock records if we fail to acquire a lock (and the lock hasn't timed out).

Keep the blocking lock record and the pending lock records consistent
if we are dealing with multiple blocking lock requests in one SMB1 LockingX
request.

Ensure we re-add the records under the record lock, to avoid race
conditions.

Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout.

https://bugzilla.samba.org/show_bug.cgi?id=10684

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
source3/smbd/blocking.c