From 1b44eda77e38be97b522e1d1bf9145ec4ac03502 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 20 Nov 2012 10:47:52 -0800 Subject: [PATCH] 3.4-stable patches added patches: ipv4-avoid-undefined-behavior-in-do_ip_setsockopt.patch ipv6-setsockopt-ipipproto_ipv6-ipv6_minhopcount-forgot-to-set-return-value.patch net-correct-check-in-dev_addr_del.patch net-rps-fix-brokeness-causing-ooo-packets.patch --- ...defined-behavior-in-do_ip_setsockopt.patch | 69 +++++++++++++++++++ ...nhopcount-forgot-to-set-return-value.patch | 28 ++++++++ .../net-correct-check-in-dev_addr_del.patch | 32 +++++++++ ...ps-fix-brokeness-causing-ooo-packets.patch | 37 ++++++++++ queue-3.4/series | 4 ++ 5 files changed, 170 insertions(+) create mode 100644 queue-3.4/ipv4-avoid-undefined-behavior-in-do_ip_setsockopt.patch create mode 100644 queue-3.4/ipv6-setsockopt-ipipproto_ipv6-ipv6_minhopcount-forgot-to-set-return-value.patch create mode 100644 queue-3.4/net-correct-check-in-dev_addr_del.patch create mode 100644 queue-3.4/net-rps-fix-brokeness-causing-ooo-packets.patch diff --git a/queue-3.4/ipv4-avoid-undefined-behavior-in-do_ip_setsockopt.patch b/queue-3.4/ipv4-avoid-undefined-behavior-in-do_ip_setsockopt.patch new file mode 100644 index 00000000000..812751d042c --- /dev/null +++ b/queue-3.4/ipv4-avoid-undefined-behavior-in-do_ip_setsockopt.patch @@ -0,0 +1,69 @@ +From 41bf39d3ea484be927cebc02bab4513bc278d6b0 Mon Sep 17 00:00:00 2001 +From: Xi Wang +Date: Sun, 11 Nov 2012 11:20:01 +0000 +Subject: ipv4: avoid undefined behavior in do_ip_setsockopt() + + +From: Xi Wang + +[ Upstream commit 0c9f79be295c99ac7e4b569ca493d75fdcc19e4e ] + +(1< +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/ipv4/ip_sockglue.c | 35 ++++++++++++++++++++++------------- + 1 file changed, 22 insertions(+), 13 deletions(-) + +--- a/net/ipv4/ip_sockglue.c ++++ b/net/ipv4/ip_sockglue.c +@@ -456,19 +456,28 @@ static int do_ip_setsockopt(struct sock + struct inet_sock *inet = inet_sk(sk); + int val = 0, err; + +- if (((1<= sizeof(int)) { + if (get_user(val, (int __user *) optval)) + return -EFAULT; diff --git a/queue-3.4/ipv6-setsockopt-ipipproto_ipv6-ipv6_minhopcount-forgot-to-set-return-value.patch b/queue-3.4/ipv6-setsockopt-ipipproto_ipv6-ipv6_minhopcount-forgot-to-set-return-value.patch new file mode 100644 index 00000000000..cbb38dffb6f --- /dev/null +++ b/queue-3.4/ipv6-setsockopt-ipipproto_ipv6-ipv6_minhopcount-forgot-to-set-return-value.patch @@ -0,0 +1,28 @@ +From 63950c29d47e5334b985def26fca4345fc91e75c Mon Sep 17 00:00:00 2001 +From: Hannes Frederic Sowa +Date: Sat, 10 Nov 2012 19:52:34 +0000 +Subject: ipv6: setsockopt(IPIPPROTO_IPV6, IPV6_MINHOPCOUNT) forgot to set return value + + +From: Hannes Frederic Sowa + +[ Upstream commit d4596bad2a713fcd0def492b1960e6d899d5baa8 ] + +Cc: Stephen Hemminger +Signed-off-by: Hannes Frederic Sowa +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/ipv6/ipv6_sockglue.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/net/ipv6/ipv6_sockglue.c ++++ b/net/ipv6/ipv6_sockglue.c +@@ -828,6 +828,7 @@ pref_skip_coa: + if (val < 0 || val > 255) + goto e_inval; + np->min_hopcount = val; ++ retv = 0; + break; + case IPV6_DONTFRAG: + np->dontfrag = valbool; diff --git a/queue-3.4/net-correct-check-in-dev_addr_del.patch b/queue-3.4/net-correct-check-in-dev_addr_del.patch new file mode 100644 index 00000000000..aed604e9099 --- /dev/null +++ b/queue-3.4/net-correct-check-in-dev_addr_del.patch @@ -0,0 +1,32 @@ +From d1f6864ea9a9ab2f8a8e9322c94ed073bd6c41e2 Mon Sep 17 00:00:00 2001 +From: Jiri Pirko +Date: Wed, 14 Nov 2012 02:51:04 +0000 +Subject: net: correct check in dev_addr_del() + + +From: Jiri Pirko + +[ Upstream commit a652208e0b52c190e57f2a075ffb5e897fe31c3b ] + +Check (ha->addr == dev->dev_addr) is always true because dev_addr_init() +sets this. Correct the check to behave properly on addr removal. + +Signed-off-by: Jiri Pirko +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/core/dev_addr_lists.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/net/core/dev_addr_lists.c ++++ b/net/core/dev_addr_lists.c +@@ -308,7 +308,8 @@ int dev_addr_del(struct net_device *dev, + */ + ha = list_first_entry(&dev->dev_addrs.list, + struct netdev_hw_addr, list); +- if (ha->addr == dev->dev_addr && ha->refcount == 1) ++ if (!memcmp(ha->addr, addr, dev->addr_len) && ++ ha->type == addr_type && ha->refcount == 1) + return -ENOENT; + + err = __hw_addr_del(&dev->dev_addrs, addr, dev->addr_len, diff --git a/queue-3.4/net-rps-fix-brokeness-causing-ooo-packets.patch b/queue-3.4/net-rps-fix-brokeness-causing-ooo-packets.patch new file mode 100644 index 00000000000..123feb875d2 --- /dev/null +++ b/queue-3.4/net-rps-fix-brokeness-causing-ooo-packets.patch @@ -0,0 +1,37 @@ +From d661003efcb9c8d8883eca743bf4fc448aa47f9f Mon Sep 17 00:00:00 2001 +From: Tom Herbert +Date: Fri, 16 Nov 2012 09:04:15 +0000 +Subject: net-rps: Fix brokeness causing OOO packets + + +From: Tom Herbert + +[ Upstream commit baefa31db2f2b13a05d1b81bdf2d20d487f58b0a ] + +In commit c445477d74ab3779 which adds aRFS to the kernel, the CPU +selected for RFS is not set correctly when CPU is changing. +This is causing OOO packets and probably other issues. + +Signed-off-by: Tom Herbert +Acked-by: Eric Dumazet +Acked-by: Ben Hutchings +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/core/dev.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -2763,8 +2763,10 @@ static int get_rps_cpu(struct net_device + if (unlikely(tcpu != next_cpu) && + (tcpu == RPS_NO_CPU || !cpu_online(tcpu) || + ((int)(per_cpu(softnet_data, tcpu).input_queue_head - +- rflow->last_qtail)) >= 0)) ++ rflow->last_qtail)) >= 0)) { ++ tcpu = next_cpu; + rflow = set_rps_cpu(dev, skb, rflow, next_cpu); ++ } + + if (tcpu != RPS_NO_CPU && cpu_online(tcpu)) { + *rflowp = rflow; diff --git a/queue-3.4/series b/queue-3.4/series index a2e627e0de8..eedfe19a3b1 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -20,3 +20,7 @@ asoc-wm8978-pll-incorrectly-configured-when-codec-is-master.patch asoc-dapm-use-card_list-during-dapm-shutdown.patch ubifs-fix-mounting-problems-after-power-cuts.patch ubifs-introduce-categorized-lprops-counter.patch +ipv4-avoid-undefined-behavior-in-do_ip_setsockopt.patch +ipv6-setsockopt-ipipproto_ipv6-ipv6_minhopcount-forgot-to-set-return-value.patch +net-correct-check-in-dev_addr_del.patch +net-rps-fix-brokeness-causing-ooo-packets.patch -- 2.47.3