Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-05-10 14:13:58 +0200
committerJiri Slaby <jslaby@suse.cz>2019-05-16 08:27:59 +0200
commita46890bef15991afe25b9bb556a9ee4414b6cb81 (patch)
tree106c6fccdb88a2c7f7b769246eb528d28e2cb138
parent126c1f8d287aa094312ccc99dc8b51e8b6450b1c (diff)
tun: add a missing rcu_read_unlock() in error path
(networking-stable-19_03_28).
-rw-r--r--patches.suse/tun-add-a-missing-rcu_read_unlock-in-error-path.patch29
-rw-r--r--series.conf1
2 files changed, 30 insertions, 0 deletions
diff --git a/patches.suse/tun-add-a-missing-rcu_read_unlock-in-error-path.patch b/patches.suse/tun-add-a-missing-rcu_read_unlock-in-error-path.patch
new file mode 100644
index 0000000000..915d0e431c
--- /dev/null
+++ b/patches.suse/tun-add-a-missing-rcu_read_unlock-in-error-path.patch
@@ -0,0 +1,29 @@
+From: Eric Dumazet <edumazet@google.com>
+Date: Sat, 16 Mar 2019 13:09:53 -0700
+Subject: tun: add a missing rcu_read_unlock() in error path
+Git-commit: 9180bb4f046064dfa4541488102703b402bb04e1
+Patch-mainline: v5.1-rc3
+References: networking-stable-19_03_28
+
+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>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/net/tun.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/tun.c
++++ b/drivers/net/tun.c
+@@ -1353,6 +1353,7 @@ drop:
+ rcu_read_lock();
+ if (unlikely(!(tun->dev->flags & IFF_UP))) {
+ err = -EIO;
++ rcu_read_unlock();
+ goto drop;
+ }
+
diff --git a/series.conf b/series.conf
index 195538c2d0..bd5f221d25 100644
--- a/series.conf
+++ b/series.conf
@@ -21579,6 +21579,7 @@
patches.fixes/NFSv4.1-don-t-free-interrupted-slot-on-open.patch
patches.fixes/NFS-Fix-a-typo-in-nfs_init_timeout_values.patch
patches.suse/tun-properly-test-for-IFF_UP.patch
+ patches.suse/tun-add-a-missing-rcu_read_unlock-in-error-path.patch
patches.drivers/mISDN-hfcpci-Test-both-vendor-device-ID-for-Digium-H.patch
patches.suse/net-packet-Set-__GFP_NOWARN-upon-allocation-in-alloc.patch
patches.fixes/0001-netfilter-bridge-set-skb-transport_header-before-ent.patch