From: Greg Kroah-Hartman Date: Tue, 20 Nov 2012 18:47:47 +0000 (-0800) Subject: 3.0-stable patches X-Git-Tag: v3.0.53~23^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=29e14cc270f99299e9da8690ea8c38640ba6a576;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-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 --- diff --git a/queue-3.0/ipv4-avoid-undefined-behavior-in-do_ip_setsockopt.patch b/queue-3.0/ipv4-avoid-undefined-behavior-in-do_ip_setsockopt.patch new file mode 100644 index 00000000000..b8e16ca304c --- /dev/null +++ b/queue-3.0/ipv4-avoid-undefined-behavior-in-do_ip_setsockopt.patch @@ -0,0 +1,67 @@ +From 668130e8b7bb303d058d8b5af873e6c67b63856a 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 | 33 +++++++++++++++++++++------------ + 1 file changed, 21 insertions(+), 12 deletions(-) + +--- a/net/ipv4/ip_sockglue.c ++++ b/net/ipv4/ip_sockglue.c +@@ -467,18 +467,27 @@ 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.0/ipv6-setsockopt-ipipproto_ipv6-ipv6_minhopcount-forgot-to-set-return-value.patch b/queue-3.0/ipv6-setsockopt-ipipproto_ipv6-ipv6_minhopcount-forgot-to-set-return-value.patch new file mode 100644 index 00000000000..02ae1cae8eb --- /dev/null +++ b/queue-3.0/ipv6-setsockopt-ipipproto_ipv6-ipv6_minhopcount-forgot-to-set-return-value.patch @@ -0,0 +1,28 @@ +From 0a3fff76600507e757ae3d9d38f0f0b9332072ce 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 +@@ -798,6 +798,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.0/net-correct-check-in-dev_addr_del.patch b/queue-3.0/net-correct-check-in-dev_addr_del.patch new file mode 100644 index 00000000000..eb762008bf2 --- /dev/null +++ b/queue-3.0/net-correct-check-in-dev_addr_del.patch @@ -0,0 +1,32 @@ +From 4fce25c3e4188b58572ad661a425f0606a73bc9f 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 +@@ -307,7 +307,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.0/net-rps-fix-brokeness-causing-ooo-packets.patch b/queue-3.0/net-rps-fix-brokeness-causing-ooo-packets.patch new file mode 100644 index 00000000000..7f6ff293e6d --- /dev/null +++ b/queue-3.0/net-rps-fix-brokeness-causing-ooo-packets.patch @@ -0,0 +1,37 @@ +From 04bf57cf63408af7f9e5bf1151f541ac08d0bff8 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 +@@ -2706,8 +2706,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.0/series b/queue-3.0/series index bafcdf0469f..5d12e1b8c93 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -9,3 +9,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