jwboyer pushed to kernel (f21). "Fix tun bug causing Juniper VPN failure (rhbz 1204512)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Mar 24 22:50:53 UTC 2015


>From c21f3a3b5bb56254d1965909818dae2ef6837050 Mon Sep 17 00:00:00 2001
From: Josh Boyer <jwboyer at fedoraproject.org>
Date: Tue, 24 Mar 2015 18:50:41 -0400
Subject: Fix tun bug causing Juniper VPN failure (rhbz 1204512)


diff --git a/kernel.spec b/kernel.spec
index 902e43d..2d62fa8 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -656,6 +656,9 @@ Patch30001: aarch64-fix-tlb-issues.patch
 
 Patch26173: net-validate-the-range-we-feed-to-iov_iter_init-in-s.patch
 
+#rhbz 1204512
+Patch26174: tun-return-proper-error-code-from-tun_do_read.patch
+
 # END OF PATCH DEFINITIONS
 
 %endif
@@ -1422,6 +1425,9 @@ ApplyPatch kernel-arm64.patch -R
 
 ApplyPatch net-validate-the-range-we-feed-to-iov_iter_init-in-s.patch
 
+#rhbz 1204512
+ApplyPatch tun-return-proper-error-code-from-tun_do_read.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2281,6 +2287,9 @@ fi
 #                                    ||----w |
 #                                    ||     ||
 %changelog
+* Tue Mar 24 2015 Josh Boyer <jwboyer at fedoraproject.org>
+- Fix tun bug causing Juniper VPN failure (rhbz 1204512)
+
 * Mon Mar 23 2015 Josh Boyer <jwboyer at fedoraproject.org> - 3.19.2-201
 - Enable CONFIG_SND_BEBOB (rhbz 1204342)
 - Validate iovec range in sys_sendto/sys_recvfrom
diff --git a/tun-return-proper-error-code-from-tun_do_read.patch b/tun-return-proper-error-code-from-tun_do_read.patch
new file mode 100644
index 0000000..759e4a7
--- /dev/null
+++ b/tun-return-proper-error-code-from-tun_do_read.patch
@@ -0,0 +1,30 @@
+From 957f094f221f81e457133b1f4c4d95ffa49ff731 Mon Sep 17 00:00:00 2001
+From: Alex Gartrell <agartrell at fb.com>
+Date: Thu, 25 Dec 2014 23:22:49 -0800
+Subject: [PATCH] tun: return proper error code from tun_do_read
+
+Instead of -1 with EAGAIN, read on a O_NONBLOCK tun fd will return 0.  This
+fixes this by properly returning the error code from __skb_recv_datagram.
+
+Signed-off-by: Alex Gartrell <agartrell at fb.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/tun.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/tun.c b/drivers/net/tun.c
+index df5e94871844..c0df872f5b8c 100644
+--- a/drivers/net/tun.c
++++ b/drivers/net/tun.c
+@@ -1380,7 +1380,7 @@ static ssize_t tun_do_read(struct tun_struct *tun, struct tun_file *tfile,
+ 	skb = __skb_recv_datagram(tfile->socket.sk, noblock ? MSG_DONTWAIT : 0,
+ 				  &peeked, &off, &err);
+ 	if (!skb)
+-		return 0;
++		return err;
+ 
+ 	ret = tun_put_user(tun, tfile, skb, to);
+ 	if (unlikely(ret < 0))
+-- 
+2.1.0
+
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/kernel.git/commit/?h=f21&id=c21f3a3b5bb56254d1965909818dae2ef6837050

--
You received this message due to your preference settings at
https://apps.fedoraproject.org/notifications//fmnscmcommits.id.fedoraproject.org/email/29390


More information about the scm-commits mailing list