From 41bc7a23b26a2df1a1544d392cebaf3ad4b7570a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 29 Mar 2019 07:08:53 +0100 Subject: [PATCH] 5.0-stable patches added patches: tun-add-a-missing-rcu_read_unlock-in-error-path.patch --- queue-5.0/series | 1 + ...issing-rcu_read_unlock-in-error-path.patch | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 queue-5.0/tun-add-a-missing-rcu_read_unlock-in-error-path.patch diff --git a/queue-5.0/series b/queue-5.0/series index 4b036596028..15ab6945d66 100644 --- a/queue-5.0/series +++ b/queue-5.0/series @@ -34,3 +34,4 @@ net-mii-fix-pause-cap-advertisement-from-linkmode_adv_to_lcl_adv_t-helper.patch net-phy-don-t-clear-bmcr-in-genphy_soft_reset.patch r8169-fix-cable-re-plugging-issue.patch ila-fix-rhashtable-walker-list-corruption.patch +tun-add-a-missing-rcu_read_unlock-in-error-path.patch diff --git a/queue-5.0/tun-add-a-missing-rcu_read_unlock-in-error-path.patch b/queue-5.0/tun-add-a-missing-rcu_read_unlock-in-error-path.patch new file mode 100644 index 00000000000..8a186f0b664 --- /dev/null +++ b/queue-5.0/tun-add-a-missing-rcu_read_unlock-in-error-path.patch @@ -0,0 +1,32 @@ +From 9180bb4f046064dfa4541488102703b402bb04e1 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Sat, 16 Mar 2019 13:09:53 -0700 +Subject: tun: add a missing rcu_read_unlock() in error path + +From: Eric Dumazet + +commit 9180bb4f046064dfa4541488102703b402bb04e1 upstream. + +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 +Reported-by: syzbot +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/tun.c | 1 + + 1 file changed, 1 insertion(+) + +--- 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; + } + -- 2.39.5