aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-03-16 13:09:53 -0700
committerDavid S. Miller <davem@davemloft.net>2019-03-16 13:16:37 -0700
commit9180bb4f046064dfa4541488102703b402bb04e1 (patch)
tree8f5cd0f61fe38104ecb70f84ac3a63d6f9f4559b /drivers/net
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf (diff)
downloadlinux-dev-9180bb4f046064dfa4541488102703b402bb04e1.tar.xz
linux-dev-9180bb4f046064dfa4541488102703b402bb04e1.zip
tun: add a missing rcu_read_unlock() in error path
In my latest patch I missed one rcu_read_unlock(), in case device is down. Fixes: 4477138fa0ae ("tun: properly test for IFF_UP") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: syzbot <syzkaller@googlegroups.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/tun.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 0d343359f647..e9ca1c088d0b 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1960,6 +1960,7 @@ drop:
rcu_read_lock();
if (unlikely(!(tun->dev->flags & IFF_UP))) {
err = -EIO;
+ rcu_read_unlock();
goto drop;
}