s3: smbd: Restart reading the incoming SMB2 fd when the send queue is drained.
authorJeremy Allison <jra@samba.org>
Thu, 2 Mar 2017 17:13:23 +0000 (09:13 -0800)
committerRalph Boehme <slow@samba.org>
Fri, 3 Mar 2017 01:23:20 +0000 (02:23 +0100)
commit1e0c79ddb34be9a2b9fa92d35387c443c4a381ae
treec2385184ede14b01954235cfc866b4d1dcc6806e
parent07af7774f3bd3574be0632284a6ea220b5fb3c76
s3: smbd: Restart reading the incoming SMB2 fd when the send queue is drained.

When the send queue grows greater than xconn->smb2.credits.max/16,
smbd_smb2_request_next_incoming() doesn't allocate a new request in state->req.

After smbd_smb2_io_handler() is called, it marks the fd not readable as
state->req == NULL, and never marks it readable again.

Fix by calling smbd_smb2_request_next_incoming() to restart
reads inside smbd_smb2_flush_send_queue() which drains the
send queue.

Reported by <chen.yehua@h3c.com>

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Mar  3 02:23:20 CET 2017 on sn-devel-144
source3/smbd/smb2_server.c