tun: add a missing rcu_read_unlock() in error path
Subsystems (3)
PATCH 1/1 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 <[email protected]>
Reported-by syzbot <[email protected]>
--- drivers/net/tun.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/tun.c +1 -0
@@ -1960,6 +1960,7 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,rcu_read_lock ();if (unlikely (!(tun->dev->flags &IFF_UP ))) { err = -EIO ; +rcu_read_unlock (); goto drop; }
Signature · 1 line
2.21.0.225.g810b269d1ac-goog
From: Eric Dumazet <[email protected]>
Date: Sat, 16 Mar 2019 13:09:53 -0700
Quoted 6 lines
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 <[email protected]>Reported-by syzbot <[email protected]>
Applied, thanks Eric.