s3:smb2_lock: always use tevent_req_defer_callback() if we go async
authorStefan Metzmacher <metze@samba.org>
Tue, 16 Sep 2014 06:05:31 +0000 (08:05 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 19 Sep 2014 07:15:12 +0000 (09:15 +0200)
commit1d53557df59adc691d726aa2094e877409a7f92c
tree84202fe5f6dced34676206a93f0674fcf2c0f1c1
parent04a9b0a7b23c2256b782bfc5800cf81f7c73c953
s3:smb2_lock: always use tevent_req_defer_callback() if we go async

process_blocking_lock_queue_smb2() can call reprocess_blocked_smb2_lock()
multiple times, which results in multiple tevent_req_done() calls.

As we could disconnect the connection from there,
process_blocking_lock_queue_smb2() could crash as the local state might be
destroyed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/smbd/smb2_lock.c