Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@suse.com>2019-05-02 13:49:28 +0200
committerDenis Kirjanov <dkirjanov@suse.com>2019-05-02 13:49:51 +0200
commit5588bbdfaace975a5ac390d57edb1d436b103f34 (patch)
tree54a3afe69e2fe8ccdf9a3b1c00592a1bef3ba591
parent7e7d068b03fa6633e5da5851bd1f33d95f29153d (diff)
xfrm: fix rcu_read_unlock usage in xfrm_local_error (git-fixes).
-rw-r--r--patches.fixes/0011-xfrm-fix-rcu_read_unlock-usage-in-xfrm_local_error.patch37
-rw-r--r--series.conf1
2 files changed, 38 insertions, 0 deletions
diff --git a/patches.fixes/0011-xfrm-fix-rcu_read_unlock-usage-in-xfrm_local_error.patch b/patches.fixes/0011-xfrm-fix-rcu_read_unlock-usage-in-xfrm_local_error.patch
new file mode 100644
index 0000000000..c369bdb3f2
--- /dev/null
+++ b/patches.fixes/0011-xfrm-fix-rcu_read_unlock-usage-in-xfrm_local_error.patch
@@ -0,0 +1,37 @@
+From: Taehee Yoo <ap420073@gmail.com>
+Subject: xfrm: fix rcu_read_unlock usage in xfrm_local_error
+Patch-mainline: v4.16
+Git-commit: 46c0ef6e1eb95f619d9f62da4332749153db92f7
+References: git-fixes
+
+In the xfrm_local_error, rcu_read_unlock should be called when afinfo
+is not NULL. because xfrm_state_get_afinfo calls rcu_read_unlock
+if afinfo is NULL.
+
+Fixes: af5d27c4e12b ("xfrm: remove xfrm_state_put_afinfo")
+Signed-off-by: Taehee Yoo <ap420073@gmail.com>
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Acked-by: Denis Kirjanov <dkirjanov@suse.com>
+---
+ net/xfrm/xfrm_output.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
+index 626424645030..ccd3d76891ab 100644
+--- a/net/xfrm/xfrm_output.c
++++ b/net/xfrm/xfrm_output.c
+@@ -282,8 +282,9 @@ void xfrm_local_error(struct sk_buff *skb, int mtu)
+ return;
+
+ afinfo = xfrm_state_get_afinfo(proto);
+- if (afinfo)
++ if (afinfo) {
+ afinfo->local_error(skb, mtu);
+- rcu_read_unlock();
++ rcu_read_unlock();
++ }
+ }
+ EXPORT_SYMBOL_GPL(xfrm_local_error);
+--
+2.12.3
+
diff --git a/series.conf b/series.conf
index 3ad3af9bec..68e2697799 100644
--- a/series.conf
+++ b/series.conf
@@ -14473,6 +14473,7 @@
patches.drivers/net-mlx4_core-Fix-memory-leak-while-delete-slave-s-r.patch
patches.suse/vhost-correctly-remove-wait-queue-during-poll-failur.patch
patches.drivers/qede-Fix-barrier-usage-after-tx-doorbell-write.patch
+ patches.fixes/0011-xfrm-fix-rcu_read_unlock-usage-in-xfrm_local_error.patch
patches.fixes/vti4-Don-t-count-header-length-twice-on-tunnel-setup.patch
patches.fixes/vti6-Properly-adjust-vti6-MTU-from-MTU-of-lower-devi.patch
patches.fixes/vti6-Keep-set-MTU-on-link-creation-or-change-validat.patch