Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-01-18 07:53:27 +0100
committerJiri Slaby <jslaby@suse.cz>2019-01-18 07:53:32 +0100
commit27e0f9d0b85b961f0d09c19f1ab102c44fa331f9 (patch)
treef930595e13e56308cacf38a8d088dc243202df17
parent7ed3431f250bf6145a4c2fa2ff8b9ad7a867a524 (diff)
CIFS: Do not hide EINTR after sending network packets
-rw-r--r--patches.kernel.org/4.20.3-014-CIFS-Do-not-hide-EINTR-after-sending-network-p.patch40
-rw-r--r--series.conf1
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.3-014-CIFS-Do-not-hide-EINTR-after-sending-network-p.patch b/patches.kernel.org/4.20.3-014-CIFS-Do-not-hide-EINTR-after-sending-network-p.patch
new file mode 100644
index 0000000000..031ea7b9da
--- /dev/null
+++ b/patches.kernel.org/4.20.3-014-CIFS-Do-not-hide-EINTR-after-sending-network-p.patch
@@ -0,0 +1,40 @@
+From: Pavel Shilovsky <pshilov@microsoft.com>
+Date: Thu, 10 Jan 2019 11:27:28 -0800
+Subject: [PATCH] CIFS: Do not hide EINTR after sending network packets
+References: bnc#1012628
+Patch-mainline: 4.20.3
+Git-commit: ee13919c2e8d1f904e035ad4b4239029a8994131
+
+commit ee13919c2e8d1f904e035ad4b4239029a8994131 upstream.
+
+Currently we hide EINTR code returned from sock_sendmsg()
+and return 0 instead. This makes a caller think that we
+successfully completed the network operation which is not
+true. Fix this by properly returning EINTR to callers.
+
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
+Reviewed-by: Jeff Layton <jlayton@kernel.org>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ 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 ddab8c798389..ea59eb01a49b 100644
+--- a/fs/cifs/transport.c
++++ b/fs/cifs/transport.c
+@@ -385,7 +385,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.20.1
+
diff --git a/series.conf b/series.conf
index 0c4a6d94a4..eec0acedc5 100644
--- a/series.conf
+++ b/series.conf
@@ -251,6 +251,7 @@
patches.kernel.org/4.20.3-011-ALSA-hda-realtek-Disable-headset-Mic-VREF-for-.patch
patches.kernel.org/4.20.3-012-CIFS-Fix-adjustment-of-credits-for-MTU-request.patch
patches.kernel.org/4.20.3-013-CIFS-Do-not-set-credits-to-1-if-the-server-did.patch
+ patches.kernel.org/4.20.3-014-CIFS-Do-not-hide-EINTR-after-sending-network-p.patch
########################################################
# Build fixes that apply to the vanilla kernel too.