From patchwork Tue Mar 5 23:51:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 10840235 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC82B139A for ; Tue, 5 Mar 2019 23:52:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB8802CC3E for ; Tue, 5 Mar 2019 23:52:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B05F42D0E9; Tue, 5 Mar 2019 23:52:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FBF22D0E6 for ; Tue, 5 Mar 2019 23:52:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727691AbfCEXwH (ORCPT ); Tue, 5 Mar 2019 18:52:07 -0500 Received: from mail-pf1-f172.google.com ([209.85.210.172]:34160 "EHLO mail-pf1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727318AbfCEXwG (ORCPT ); Tue, 5 Mar 2019 18:52:06 -0500 Received: by mail-pf1-f172.google.com with SMTP id u9so6942590pfn.1 for ; Tue, 05 Mar 2019 15:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=jeh9kj+3kqhQKH7ieaG0fHxPOku5+prnDq6x9rAw5tE=; b=swjtLlVb5V7nR6DYdh1fVRa8S16ajOdN9HWVXb83nsOuZsC3TdYTR6BfbJtdUkHoP3 7aIh7hQOYNdQyZ1iC3pN6MWt4StS6Yipc5oF6NL1Or2QlGY0Wgv+JUvtRdff6eD5R6VZ tJElJ9K5vtxsFGaD96639PW+73KHdKG7w1wmjGHkGttmHr0C4GDE6z9U+q5hBpJ2zW+j aYM+2j+SGlaYqSgBsH2JDJnBgN59pRfxZIx4EbdSr64m9rrW543SWEqmPP8vbX3tLFAS tW6PmIIVYIWLR5/Rh0hTBD2oFpYi6fa5dpzPAa+84aiLyX0N0hjDyhH2Y7a4hAprd8v/ bWyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=jeh9kj+3kqhQKH7ieaG0fHxPOku5+prnDq6x9rAw5tE=; b=XDOTAk9g4FtKXl3nx1jgfr0688Q/XYg8QlQ3RGl5lmzqQIzOJ93oi5TZYgYfmE0Gfp xizVAWY4Ib6/tggRy0ZgLHdUKvj+cxFumwJvGyPV/Q0UdNK3hAmgHZ1XbliJbbO0bCnu ISMk2Kq41jNkrmZqqkMeQJ27gTDQ/zYuFVCI7igzByIgEww0J/ZOPcIZxK003KPS6lNQ tiN2zosQv4GqZronNtF+UBhdk0aLBooGX2i/dnUWObsgpQQ2rxBdCHGZz9nS9MuxNItZ ZXuikxT87brYyBj1h+I3q162ZXpscl3Pz7ltcUynJ+LDXwOq3nsq+EmaXqf3bK3pHp0v YOHA== X-Gm-Message-State: APjAAAVxuA6C8wTngeZBv6v8gEXIN3uQU+b3TPcCVvPlUn/6F03qHJx4 gaiuYorSqjzsxbwR5HwUIrktxsc= X-Google-Smtp-Source: APXvYqzaIsmbJM4BpO+9GwrWnRK1czkkEjEA+v86avWADm0K/wnJvifP8dXJWdwrMxY9Whma1tSjRg== X-Received: by 2002:a17:902:4081:: with SMTP id c1mr3871085pld.297.1551829925940; Tue, 05 Mar 2019 15:52:05 -0800 (PST) Received: from ubuntu-vm.corp.microsoft.com ([2001:4898:80e8:1:a18d:4e9f:6b7c:507d]) by smtp.gmail.com with ESMTPSA id l64sm50342pga.87.2019.03.05.15.52.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Mar 2019 15:52:05 -0800 (PST) From: Pavel Shilovsky X-Google-Original-From: Pavel Shilovsky To: linux-cifs@vger.kernel.org, smfrench@gmail.com Subject: [PATCH 1/3] CIFS: Only send SMB2_NEGOTIATE command on new TCP connections Date: Tue, 5 Mar 2019 15:51:55 -0800 Message-Id: <1551829917-48772-3-git-send-email-pshilov@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1551829917-48772-1-git-send-email-pshilov@microsoft.com> References: <1551829917-48772-1-git-send-email-pshilov@microsoft.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Do not allow commands other than SMB2_NEGOTIATE to be sent over recently established TCP connections. Return -EAGAIN to let upper layers handle it properly. Signed-off-by: Pavel Shilovsky --- fs/cifs/smb2transport.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c index fa1fec2..d118157 100644 --- a/fs/cifs/smb2transport.c +++ b/fs/cifs/smb2transport.c @@ -619,6 +619,10 @@ smb2_get_mid_entry(struct cifs_ses *ses, struct smb2_sync_hdr *shdr, return -EAGAIN; } + if (ses->server->tcpStatus == CifsNeedNegotiate && + shdr->Command != SMB2_NEGOTIATE) + return -EAGAIN; + if (ses->status == CifsNew) { if ((shdr->Command != SMB2_SESSION_SETUP) && (shdr->Command != SMB2_NEGOTIATE)) @@ -702,6 +706,10 @@ smb2_setup_async_request(struct TCP_Server_Info *server, struct smb_rqst *rqst) (struct smb2_sync_hdr *)rqst->rq_iov[0].iov_base; struct mid_q_entry *mid; + if (server->tcpStatus == CifsNeedNegotiate && + shdr->Command != SMB2_NEGOTIATE) + return ERR_PTR(-EAGAIN); + smb2_seq_num_into_buf(server, shdr); mid = smb2_mid_entry_alloc(shdr, server); From patchwork Tue Mar 5 23:51:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 10840237 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E31C21575 for ; Tue, 5 Mar 2019 23:52:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2ACD2D0DD for ; Tue, 5 Mar 2019 23:52:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C718E2D0E7; Tue, 5 Mar 2019 23:52:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 803492D0C2 for ; Tue, 5 Mar 2019 23:52:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727733AbfCEXwI (ORCPT ); Tue, 5 Mar 2019 18:52:08 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:41204 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727318AbfCEXwI (ORCPT ); Tue, 5 Mar 2019 18:52:08 -0500 Received: by mail-pf1-f194.google.com with SMTP id d25so6934932pfn.8 for ; Tue, 05 Mar 2019 15:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=zpoVSvMEAqaRub2/toRZFsTRKMFffDRFEP/CMONmCN0=; b=oPUdTYoSe7hqhKD/b/tdFYn2q9MFUA2stJIxdroFBVeJFiL3yrEtS88Oup55jJlKte pjXxwigZEp57SFJB/R3njm8rPwXAvaO4VCQCpTNKVT9ZmngH+VreF70vgiBY/gSAEB5l 9SnL66kfi2JYeZsUTHOCSJzGoybsc06qsg6Yp614AE0i6wQC7sOHfSJiva9JxopYa0HF bOj0wPduHndBsbHIwSft38ZS3v9DfnXh8f5cFfQYtEgA/33U0O8qo71q2nI4qyoNTO+O Y0rd+F0nC6ZKLJx39pCfaihMsdoOTyRONBXD9fl7dRIUucysCOIglu5NOfNlsXuycFMt 6X9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=zpoVSvMEAqaRub2/toRZFsTRKMFffDRFEP/CMONmCN0=; b=lYfX+JucQtiIG9L6awLVFnpH1FAF0ZZPou9LuLbW2yNs7I6+7dXK4mZHlOci06XQAh k9Va6LIFjjFXNItpVyTLY125M1Ss0moU5etVYvotQyEKsflhH0gCgA8KeZ5Oct/m0X0M 6vABqf9GmZrK/QfsvjATHY+JecHe+Yzc6DOMlIvQsFd3iLIR9MW04avc6w5KDq0f27lU J1l45bVSCLGVX6x4IgwvRbqim8Twea1XXVZoN7AjfG2RkEEQjaLe9g4Q0ys5rUgnstAL 5pXP4daA/yx8Sv+g4jiFWfmnB78HccQFpvRwm1+OTeqBarvlr9SkTWxANxhlJQ5k31+3 n36A== X-Gm-Message-State: APjAAAWqZk3XYwV/DJUBAZB5xlj8nRfTCkXHoxRJQRfAjNGKLqe48llz o3C0Smhz/6HShCYFRmd+2KTE8vM= X-Google-Smtp-Source: APXvYqwk+lo3f7QGW2fLBQcaDBwCGT+4OrMHNQEwBMQsCN7mmdVT3RhuIAO1QdT5SUWmqEdHhstaMw== X-Received: by 2002:a17:902:6804:: with SMTP id h4mr3856031plk.115.1551829927004; Tue, 05 Mar 2019 15:52:07 -0800 (PST) Received: from ubuntu-vm.corp.microsoft.com ([2001:4898:80e8:1:a18d:4e9f:6b7c:507d]) by smtp.gmail.com with ESMTPSA id l64sm50342pga.87.2019.03.05.15.52.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Mar 2019 15:52:06 -0800 (PST) From: Pavel Shilovsky X-Google-Original-From: Pavel Shilovsky To: linux-cifs@vger.kernel.org, smfrench@gmail.com Subject: [PATCH 2/3] CIFS: Return -EAGAIN instead of -ENOTSOCK Date: Tue, 5 Mar 2019 15:51:56 -0800 Message-Id: <1551829917-48772-4-git-send-email-pshilov@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1551829917-48772-1-git-send-email-pshilov@microsoft.com> References: <1551829917-48772-1-git-send-email-pshilov@microsoft.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When we attempt to send a packet while the demultiplex thread is in the middle of cifs_reconnect() we may end up returning -ENOTSOCK to upper layers. The intent here is to retry the request once the TCP connection is up, so change it to return -EAGAIN instead. The latter error code is retryable and the upper layers will retry the request if needed. Signed-off-by: Pavel Shilovsky --- fs/cifs/transport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 9c3a680..9f23a45 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -301,8 +301,9 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst, rc = smbd_send(server, rqst); goto smbd_done; } + if (ssocket == NULL) - return -ENOTSOCK; + return -EAGAIN; /* cork the socket */ kernel_setsockopt(ssocket, SOL_TCP, TCP_CORK, From patchwork Tue Mar 5 23:51:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Shilovsky X-Patchwork-Id: 10840239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B84881575 for ; Tue, 5 Mar 2019 23:52:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A85992D0E7 for ; Tue, 5 Mar 2019 23:52:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CD762D0E6; Tue, 5 Mar 2019 23:52:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E5AC2D051 for ; Tue, 5 Mar 2019 23:52:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727826AbfCEXwJ (ORCPT ); Tue, 5 Mar 2019 18:52:09 -0500 Received: from mail-pg1-f182.google.com ([209.85.215.182]:33111 "EHLO mail-pg1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727318AbfCEXwJ (ORCPT ); Tue, 5 Mar 2019 18:52:09 -0500 Received: by mail-pg1-f182.google.com with SMTP id h11so6798623pgl.0 for ; Tue, 05 Mar 2019 15:52:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=q7Xjx3ImxRb9Dz2fGk0FA5bqkJIA9Oji3akMM4VIS2o=; b=hf8yYyVY1NXG5b/d5eyF8f+h4LYdGQjhcANYrSXvqxckE52Ng7E26eLj9MjVf/Txsm VcTX1j6jklcGOch1NR8f9rS1/B5ul86ODRD2w42vQChffXFq04ER2PlmLxbjcvWKVpw9 TCeix7q3KRrTLmkokRZhDWpcnmcL67T/BPBidYY49Xol9kX0JvUL3LNj5WfNjDjELobc moYt0Xn+/+u9srhaTpZ4rsOlcwIF04QMkfDAAgtBNlX667cvDsOeNjlN66jK0nlD6TRe ekSFlXrmWlp4UyenjETCXYY+JLhSuIXKzBZKIZQY9I4gd8LRg7ybaiWLUrp5mcivdNXP LoPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=q7Xjx3ImxRb9Dz2fGk0FA5bqkJIA9Oji3akMM4VIS2o=; b=AhKsatQtM8FPt/mhV/K1W6Fsio7YsSPyPmYja7Z+zOj1d4dGCeyAr214+Lzx/cGPEU ZBlR7zzlAeTeGlMvg3X43lVYwgY6W0RkNJN4wQQaxtAvzWIfjzZeenCtHcuIR9FnjP0B 9rxPa90/ePO7xadyPJcdWpO8oHnZdytH+g/h1TDsXNk4bmAqigs9krHNdj63xaQCycD2 rQwUvD/W/LhnJkJlu9C1UlsvvhE4R4BixEckIOASVp21QtddEbXDTsKKwyFbUjOpGVAU etqURsDHpr4R+V9EbIiMv0snKS2zFmxL//H+j42jWd6CAjoVVeMso+xTHciXG37x092T scgA== X-Gm-Message-State: APjAAAVa2VNCIYi9p5kXm6QiDpbTrI+89IdpDhFFMr3GgitpgBODhTlU 0Z2oGbqKsmaFAItwkKLyi5Q4XgU= X-Google-Smtp-Source: APXvYqx2lqxokv97RVRmU4gmM5VBmyfF3EqpeWPSl5h8c4Y09PbAucffQi81L/AOzGPeIKGMHnDCFw== X-Received: by 2002:a63:c0b:: with SMTP id b11mr3645897pgl.388.1551829928228; Tue, 05 Mar 2019 15:52:08 -0800 (PST) Received: from ubuntu-vm.corp.microsoft.com ([2001:4898:80e8:1:a18d:4e9f:6b7c:507d]) by smtp.gmail.com with ESMTPSA id l64sm50342pga.87.2019.03.05.15.52.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Mar 2019 15:52:07 -0800 (PST) From: Pavel Shilovsky X-Google-Original-From: Pavel Shilovsky To: linux-cifs@vger.kernel.org, smfrench@gmail.com Subject: [PATCH 3/3] CIFS: Mask off signals when sending SMB packets Date: Tue, 5 Mar 2019 15:51:57 -0800 Message-Id: <1551829917-48772-5-git-send-email-pshilov@microsoft.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1551829917-48772-1-git-send-email-pshilov@microsoft.com> References: <1551829917-48772-1-git-send-email-pshilov@microsoft.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We don't want to break SMB sessions if we receive signals when sending packets through the network. Fix it by masking off signals inside __smb_send_rqst() to avoid partial packet sends due to interrupts. Return -EINTR if a signal is pending and only a part of the packet was sent. Return a success status code if the whole packet was sent regardless of signal being pending or not. This keeps a mid entry for the request in the pending queue and allows the demultiplex thread to handle a response from the server properly. Signed-off-by: Pavel Shilovsky --- fs/cifs/transport.c | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 9f23a45..7ce8a58 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "cifspdu.h" #include "cifsglob.h" #include "cifsproto.h" @@ -291,6 +292,7 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst, int n_vec; unsigned int send_length = 0; unsigned int i, j; + sigset_t mask, oldmask; size_t total_len = 0, sent, size; struct socket *ssocket = server->ssocket; struct msghdr smb_msg; @@ -305,6 +307,11 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst, if (ssocket == NULL) return -EAGAIN; + if (signal_pending(current)) { + cifs_dbg(FYI, "signal is pending before sending any data\n"); + return -EINTR; + } + /* cork the socket */ kernel_setsockopt(ssocket, SOL_TCP, TCP_CORK, (char *)&val, sizeof(val)); @@ -313,6 +320,16 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst, send_length += smb_rqst_len(server, &rqst[j]); rfc1002_marker = cpu_to_be32(send_length); + /* + * We should not allow signals to interrupt the network send because + * any partial send will cause session reconnects thus increasing + * latency of system calls and overload a server with unnecessary + * requests. + */ + + sigfillset(&mask); + sigprocmask(SIG_BLOCK, &mask, &oldmask); + /* Generate a rfc1002 marker for SMB2+ */ if (server->vals->header_preamble_size == 0) { struct kvec hiov = { @@ -322,7 +339,7 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst, iov_iter_kvec(&smb_msg.msg_iter, WRITE, &hiov, 1, 4); rc = smb_send_kvec(server, &smb_msg, &sent); if (rc < 0) - goto uncork; + goto unmask; total_len += sent; send_length += 4; @@ -344,7 +361,7 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst, rc = smb_send_kvec(server, &smb_msg, &sent); if (rc < 0) - goto uncork; + goto unmask; total_len += sent; @@ -366,7 +383,25 @@ __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst, } } -uncork: +unmask: + sigprocmask(SIG_SETMASK, &oldmask, NULL); + + /* + * If signal is pending but we have already sent the whole packet to + * the server we need to return success status to allow a corresponding + * mid entry to be kept in the pending requests queue thus allowing + * to handle responses from the server by the client. + * + * If only part of the packet has been sent there is no need to hide + * interrupt because the session will be reconnected anyway, so there + * won't be any response from the server to handle. + */ + + if (signal_pending(current) && (total_len != send_length)) { + cifs_dbg(FYI, "signal is pending after attempt to send\n"); + rc = -EINTR; + } + /* uncork it */ val = 0; kernel_setsockopt(ssocket, SOL_TCP, TCP_CORK,