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 <[email protected]> Date: Thu, Jan 10, 2019 at 4:25 PM Subject: [PATCH 4/7] CIFS: Do not hide EINTR after sending network packets To: <[email protected]> Cc: Steve French <[email protected]>, Ronnie Sahlberg <[email protected]> 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: <[email protected]> Signed-off-by: Pavel Shilovsky <[email protected]> --- 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

