[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAH2r5mtF41PP_CJ_VDNdftJycNh53mOemC5FN-PYGGN3Hg=ETA@mail.gmail.com>
Date: Fri, 11 Jan 2019 00:29:04 -0600
From: Steve French <smfrench@...il.com>
To: linux-fsdevel <linux-fsdevel@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Fwd: [PATCH 4/7] CIFS: Do not hide EINTR after sending network packets
Pavel's patch looks correct to me, but since this may be a common
issue, how to better handle unexpected EINTR on sock_sendmsg, others
outside cifs/smb3 world may have run into this before and have
additional comments.
---------- Forwarded message ---------
From: Pavel Shilovsky <piastryyy@...il.com>
Date: Thu, Jan 10, 2019 at 4:25 PM
Subject: [PATCH 4/7] CIFS: Do not hide EINTR after sending network packets
To: <linux-cifs@...r.kernel.org>
Cc: Steve French <smfrench@...il.com>, Ronnie Sahlberg <lsahlber@...hat.com>
Currently we hide EINTR code returned from sock_sendmsg()
and return 0 instead. This makes a caller think that we
have successfully completed the network operation which is
not true. Fix this by properly returning EINTR to callers.
Cc: <stable@...r.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@...rosoft.com>
---
fs/cifs/transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index e047f06..aaff9c5 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -387,7 +387,7 @@ __smb_send_rqst(struct TCP_Server_Info *server,
int num_rqst,
if (rc < 0 && rc != -EINTR)
cifs_dbg(VFS, "Error %d sending data on socket to server\n",
rc);
- else
+ else if (rc > 0)
rc = 0;
return rc;
--
2.7.4
--
Thanks,
Steve
Powered by blists - more mailing lists