This is a note to let you know that I've just added the patch titled tun: return proper error code from tun_do_read to the 3.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tun-return-proper-error-code-from-tun_do_read.patch and it can be found in the queue-3.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Tue Apr 21 23:05:14 CEST 2015 From: Alex Gartrell <agartrell@xxxxxx> Date: Thu, 25 Dec 2014 23:22:49 -0800 Subject: tun: return proper error code from tun_do_read From: Alex Gartrell <agartrell@xxxxxx> [ Upstream commit 957f094f221f81e457133b1f4c4d95ffa49ff731 ] 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@xxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/tun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1368,7 +1368,7 @@ static ssize_t tun_do_read(struct tun_st 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)) Patches currently in stable-queue which might be from agartrell@xxxxxx are queue-3.19/tun-return-proper-error-code-from-tun_do_read.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html