summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorPavel Shilovsky2019-01-19 02:25:36 +0100
committerSteve French2019-01-24 21:50:57 +0100
commitef68e831840c40c7d01b328b3c0f5d8c4796c232 (patch)
tree063f809b38252b893f71bcc101d115048b049b91 /fs/cifs/cifssmb.c
parentsmb3: Cleanup license mess (diff)
downloadkernel-qcow2-linux-ef68e831840c40c7d01b328b3c0f5d8c4796c232.tar.gz
kernel-qcow2-linux-ef68e831840c40c7d01b328b3c0f5d8c4796c232.tar.xz
kernel-qcow2-linux-ef68e831840c40c7d01b328b3c0f5d8c4796c232.zip
CIFS: Do not reconnect TCP session in add_credits()
When executing add_credits() we currently call cifs_reconnect() if the number of credits is zero and there are no requests in flight. In this case we may call cifs_reconnect() recursively twice and cause memory corruption given the following sequence of functions: mid1.callback() -> add_credits() -> cifs_reconnect() -> -> mid2.callback() -> add_credits() -> cifs_reconnect(). Fix this by avoiding to call cifs_reconnect() in add_credits() and checking for zero credits in the demultiplex thread. Cc: <stable@vger.kernel.org> Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
0 files changed, 0 insertions, 0 deletions