diff options
author | Eric Dumazet <edumazet@google.com> | 2019-03-16 21:09:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-16 21:16:37 +0100 |
commit | 9180bb4f046064dfa4541488102703b402bb04e1 (patch) | |
tree | 8f5cd0f61fe38104ecb70f84ac3a63d6f9f4559b | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf (diff) | |
download | linux-9180bb4f046064dfa4541488102703b402bb04e1.tar.xz linux-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>
-rw-r--r-- | drivers/net/tun.c | 1 |
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; } |