Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eric Dumazet and committed by
David S. Miller
9180bb4f 0aedadcf

+1
+1
drivers/net/tun.c
··· 1960 1960 rcu_read_lock(); 1961 1961 if (unlikely(!(tun->dev->flags & IFF_UP))) { 1962 1962 err = -EIO; 1963 + rcu_read_unlock(); 1963 1964 goto drop; 1964 1965 } 1965 1966