1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

smbd: Avoid exit_server() in setup_kernel_oplock_poll_open()

Failure to postpone a request is not really fatal: We just don't retry
as wanted but return an error to the client that might have resolved
itself after a few seconds. From my point of view such a spurious and
rare error, which is highly unlikely anyway does not justify to kill
that client's connection.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2019-07-30 13:41:17 +02:00 committed by Jeremy Allison
parent 2c653515f3
commit 939a109750

View File

@ -2523,23 +2523,28 @@ static void setup_kernel_oplock_poll_open(struct smb_request *req,
open_rec = talloc_zero(NULL, struct deferred_open_record);
if (open_rec == NULL) {
exit_server("talloc failed");
DBG_WARNING("talloc failed\n");
return;
}
open_rec->xconn = req->xconn;
open_rec->mid = req->mid;
ok = push_deferred_open_message_smb(req, timeout, id, open_rec);
if (!ok) {
exit_server("push_deferred_open_message_smb failed");
}
open_rec->te = tevent_add_timer(req->sconn->ev_ctx,
open_rec,
timeval_current_ofs(1, 0),
kernel_oplock_poll_open_timer,
open_rec);
if (open_rec->te == NULL) {
exit_server("tevent_add_timer failed");
DBG_WARNING("tevent_add_timer failed\n");
TALLOC_FREE(open_rec);
return;
}
ok = push_deferred_open_message_smb(req, timeout, id, open_rec);
if (!ok) {
DBG_WARNING("push_deferred_open_message_smb failed\n");
TALLOC_FREE(open_rec);
return;
}
DBG_DEBUG("poll request time [%s] mid [%" PRIu64 "] file_id [%s]\n",