]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 May 2019 09:15:26 +0000 (11:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 May 2019 09:15:26 +0000 (11:15 +0200)
added patches:
fib_rules-fix-error-in-backport-of-e9919a24d302-fib_rules-return-0.patch

queue-4.14/fib_rules-fix-error-in-backport-of-e9919a24d302-fib_rules-return-0.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/fib_rules-fix-error-in-backport-of-e9919a24d302-fib_rules-return-0.patch b/queue-4.14/fib_rules-fix-error-in-backport-of-e9919a24d302-fib_rules-return-0.patch
new file mode 100644 (file)
index 0000000..927a66b
--- /dev/null
@@ -0,0 +1,39 @@
+From b42f0ebbe4431ff7ce99c916555418f4a4c2be67 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Mon, 20 May 2019 11:07:29 +0200
+Subject: fib_rules: fix error in backport of e9919a24d302 ("fib_rules: return 0...")
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+When commit e9919a24d302 ("fib_rules: return 0 directly if an exactly
+same rule exists when NLM_F_EXCL not supplied") was backported to 4.9.y,
+it changed the logic a bit as err should have been reset before exiting
+the test, like it happens in the original logic.
+
+If this is not set, errors happen :(
+
+Reported-by: Nathan Chancellor <natechancellor@gmail.com>
+Reported-by: David Ahern <dsahern@gmail.com>
+Reported-by: Florian Westphal <fw@strlen.de>
+Cc: Hangbin Liu <liuhangbin@gmail.com>
+Cc: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/core/fib_rules.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
+index bb26457e8c21..c03dd2104d33 100644
+--- a/net/core/fib_rules.c
++++ b/net/core/fib_rules.c
+@@ -430,6 +430,7 @@ int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh)
+               goto errout_free;
+       if (rule_exists(ops, frh, tb, rule)) {
++              err = 0;
+               if (nlh->nlmsg_flags & NLM_F_EXCL)
+                       err = -EEXIST;
+               goto errout_free;
+-- 
+2.21.0
+
index 7c86ed1ee864c1138e0df1dac5adbadc7303a987..0b0f8739f32c3a54872e7706b89d0ed0690db5cd 100644 (file)
@@ -52,3 +52,4 @@ ipmi-ssif-compare-block-number-correctly-for-multi-part-return-messages.patch
 crypto-arm64-aes-neonbs-don-t-access-already-freed-walk.iv.patch
 crypto-salsa20-don-t-access-already-freed-walk.iv.patch
 crypto-ccm-fix-incompatibility-between-ccm-and-ccm_base.patch
+fib_rules-fix-error-in-backport-of-e9919a24d302-fib_rules-return-0.patch