]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
tun: return proper error code from tun_do_read
authorAlex Gartrell <agartrell@fb.com>
Fri, 26 Dec 2014 07:22:49 +0000 (23:22 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Dec 2014 19:14:54 +0000 (14:14 -0500)
commit957f094f221f81e457133b1f4c4d95ffa49ff731
tree874c464154b76e2088a98a3f189c9592e2933dfe
parent87897931c83038af4931990af5b9365b41829921
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@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c