From: Greg Kroah-Hartman Date: Mon, 20 May 2019 09:15:07 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v4.9.178~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7eb718900954f09975eb50bcde10a317f5ab7008;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: fib_rules-fix-error-in-backport-of-e9919a24d302-fib_rules-return-0.patch --- diff --git a/queue-4.9/fib_rules-fix-error-in-backport-of-e9919a24d302-fib_rules-return-0.patch b/queue-4.9/fib_rules-fix-error-in-backport-of-e9919a24d302-fib_rules-return-0.patch new file mode 100644 index 00000000000..b3ab0719caf --- /dev/null +++ b/queue-4.9/fib_rules-fix-error-in-backport-of-e9919a24d302-fib_rules-return-0.patch @@ -0,0 +1,34 @@ +From b42f0ebbe4431ff7ce99c916555418f4a4c2be67 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +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 + +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 +Reported-by: David Ahern +Reported-by: Florian Westphal +Cc: Hangbin Liu +Cc: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/core/fib_rules.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/net/core/fib_rules.c ++++ b/net/core/fib_rules.c +@@ -430,6 +430,7 @@ int fib_nl_newrule(struct sk_buff *skb, + goto errout_free; + + if (rule_exists(ops, frh, tb, rule)) { ++ err = 0; + if (nlh->nlmsg_flags & NLM_F_EXCL) + err = -EEXIST; + goto errout_free; diff --git a/queue-4.9/series b/queue-4.9/series index 51e4167592f..a21f977e543 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -35,3 +35,4 @@ crypto-gcm-fix-error-return-code-in-crypto_gcm_create_common.patch crypto-gcm-fix-incompatibility-between-gcm-and-gcm_base.patch crypto-salsa20-don-t-access-already-freed-walk.iv.patch crypto-arm-aes-neonbs-don-t-access-already-freed-walk.iv.patch +fib_rules-fix-error-in-backport-of-e9919a24d302-fib_rules-return-0.patch