From: Greg Kroah-Hartman Date: Mon, 29 Mar 2010 21:33:08 +0000 (-0700) Subject: .32 patches X-Git-Tag: v2.6.27.46~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=335316f8bd79665e04856b5056e5fea8e311e0a8;p=thirdparty%2Fkernel%2Fstable-queue.git .32 patches --- diff --git a/queue-2.6.32/ath9k-fix-bug_on-triggered-by-pae-frames.patch b/queue-2.6.32/ath9k-fix-bug_on-triggered-by-pae-frames.patch new file mode 100644 index 00000000000..7d2612c401b --- /dev/null +++ b/queue-2.6.32/ath9k-fix-bug_on-triggered-by-pae-frames.patch @@ -0,0 +1,86 @@ +From 4fdec031b9169b3c17938b9c4168f099f457169c Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Fri, 12 Mar 2010 04:02:43 +0100 +Subject: ath9k: fix BUG_ON triggered by PAE frames + +From: Felix Fietkau + +commit 4fdec031b9169b3c17938b9c4168f099f457169c upstream. + +When I initially stumbled upon sequence number problems with PAE frames +in ath9k, I submitted a patch to remove all special cases for PAE +frames and let them go through the normal transmit path. +Out of concern about crypto incompatibility issues, this change was +merged instead: + +commit 6c8afef551fef87a3bf24f8a74c69a7f2f72fc82 +Author: Sujith +Date: Tue Feb 9 10:07:00 2010 +0530 + + ath9k: Fix sequence numbers for PAE frames + +After a lot of testing, I'm able to reliably trigger a driver crash on +rekeying with current versions with this change in place. +It seems that the driver does not support sending out regular MPDUs with +the same TID while an A-MPDU session is active. +This leads to duplicate entries in the TID Tx buffer, which hits the +following BUG_ON in ath_tx_addto_baw(): + + index = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno); + cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); + + BUG_ON(tid->tx_buf[cindex] != NULL); + +I believe until we actually have a reproducible case of an +incompatibility with another AP using no PAE special cases, we should +simply get rid of this mess. + +This patch completely fixes my crash issues in STA mode and makes it +stay connected without throughput drops or connectivity issues even +when the AP is configured to a very short group rekey interval. + +Signed-off-by: Felix Fietkau +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/xmit.c | 21 +-------------------- + 1 file changed, 1 insertion(+), 20 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -1320,25 +1320,6 @@ static enum ath9k_pkt_type get_hw_packet + return htype; + } + +-static bool is_pae(struct sk_buff *skb) +-{ +- struct ieee80211_hdr *hdr; +- __le16 fc; +- +- hdr = (struct ieee80211_hdr *)skb->data; +- fc = hdr->frame_control; +- +- if (ieee80211_is_data(fc)) { +- if (ieee80211_is_nullfunc(fc) || +- /* Port Access Entity (IEEE 802.1X) */ +- (skb->protocol == cpu_to_be16(ETH_P_PAE))) { +- return true; +- } +- } +- +- return false; +-} +- + static int get_hw_crypto_keytype(struct sk_buff *skb) + { + struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); +@@ -1648,7 +1629,7 @@ static void ath_tx_start_dma(struct ath_ + goto tx_done; + } + +- if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) { ++ if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { + /* + * Try aggregation if it's a unicast data frame + * and the destination is HT capable. diff --git a/queue-2.6.32/cpuset-fix-the-problem-that-cpuset_mem_spread_node-returns-an-offline-node.patch b/queue-2.6.32/cpuset-fix-the-problem-that-cpuset_mem_spread_node-returns-an-offline-node.patch new file mode 100644 index 00000000000..65fc10438a0 --- /dev/null +++ b/queue-2.6.32/cpuset-fix-the-problem-that-cpuset_mem_spread_node-returns-an-offline-node.patch @@ -0,0 +1,106 @@ +From 5ab116c9349ef52d6fbd2e2917a53f13194b048e Mon Sep 17 00:00:00 2001 +From: Miao Xie +Date: Tue, 23 Mar 2010 13:35:34 -0700 +Subject: cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node + +From: Miao Xie + +commit 5ab116c9349ef52d6fbd2e2917a53f13194b048e upstream. + +cpuset_mem_spread_node() returns an offline node, and causes an oops. + +This patch fixes it by initializing task->mems_allowed to +node_states[N_HIGH_MEMORY], and updating task->mems_allowed when doing +memory hotplug. + +Signed-off-by: Miao Xie +Acked-by: David Rientjes +Reported-by: Nick Piggin +Tested-by: Nick Piggin +Cc: Paul Menage +Cc: Li Zefan +Cc: Ingo Molnar +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + init/main.c | 2 +- + kernel/cpuset.c | 20 ++++++++++++-------- + kernel/kthread.c | 2 +- + 3 files changed, 14 insertions(+), 10 deletions(-) + +--- a/init/main.c ++++ b/init/main.c +@@ -846,7 +846,7 @@ static int __init kernel_init(void * unu + /* + * init can allocate pages on any node + */ +- set_mems_allowed(node_possible_map); ++ set_mems_allowed(node_states[N_HIGH_MEMORY]); + /* + * init can run on any cpu. + */ +--- a/kernel/cpuset.c ++++ b/kernel/cpuset.c +@@ -921,9 +921,6 @@ static int update_cpumask(struct cpuset + * call to guarantee_online_mems(), as we know no one is changing + * our task's cpuset. + * +- * Hold callback_mutex around the two modifications of our tasks +- * mems_allowed to synchronize with cpuset_mems_allowed(). +- * + * While the mm_struct we are migrating is typically from some + * other task, the task_struct mems_allowed that we are hacking + * is for our current task, which must allocate new pages for that +@@ -1392,11 +1389,10 @@ static void cpuset_attach(struct cgroup_ + + if (cs == &top_cpuset) { + cpumask_copy(cpus_attach, cpu_possible_mask); +- to = node_possible_map; + } else { + guarantee_online_cpus(cs, cpus_attach); +- guarantee_online_mems(cs, &to); + } ++ guarantee_online_mems(cs, &to); + + /* do per-task migration stuff possibly for each in the threadgroup */ + cpuset_attach_task(tsk, &to, cs); +@@ -2091,15 +2087,23 @@ static int cpuset_track_online_cpus(stru + static int cpuset_track_online_nodes(struct notifier_block *self, + unsigned long action, void *arg) + { ++ nodemask_t oldmems; ++ + cgroup_lock(); + switch (action) { + case MEM_ONLINE: +- case MEM_OFFLINE: ++ oldmems = top_cpuset.mems_allowed; + mutex_lock(&callback_mutex); + top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY]; + mutex_unlock(&callback_mutex); +- if (action == MEM_OFFLINE) +- scan_for_empty_cpusets(&top_cpuset); ++ update_tasks_nodemask(&top_cpuset, &oldmems, NULL); ++ break; ++ case MEM_OFFLINE: ++ /* ++ * needn't update top_cpuset.mems_allowed explicitly because ++ * scan_for_empty_cpusets() will update it. ++ */ ++ scan_for_empty_cpusets(&top_cpuset); + break; + default: + break; +--- a/kernel/kthread.c ++++ b/kernel/kthread.c +@@ -196,7 +196,7 @@ int kthreadd(void *unused) + set_task_comm(tsk, "kthreadd"); + ignore_signals(tsk); + set_cpus_allowed_ptr(tsk, cpu_all_mask); +- set_mems_allowed(node_possible_map); ++ set_mems_allowed(node_states[N_HIGH_MEMORY]); + + current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG; + diff --git a/queue-2.6.32/series b/queue-2.6.32/series index b05deae37ec..9be628aefe9 100644 --- a/queue-2.6.32/series +++ b/queue-2.6.32/series @@ -88,3 +88,6 @@ pci-fix-access-of-pci_x_cmd-by-pcix-get-and-set-mmrbc-functions.patch pci-cleanup-error-return-for-pcix-get-and-set-mmrbc-functions.patch pci-quirk-rs780-rs880-work-around-missing-msi-initialization.patch rt2860sta-fix-argument-to-linux_pci_unmap_single.patch +ath9k-fix-bug_on-triggered-by-pae-frames.patch +cpuset-fix-the-problem-that-cpuset_mem_spread_node-returns-an-offline-node.patch +softlockup-stop-spurious-softlockup-messages-due-to-overflow.patch diff --git a/queue-2.6.32/softlockup-stop-spurious-softlockup-messages-due-to-overflow.patch b/queue-2.6.32/softlockup-stop-spurious-softlockup-messages-due-to-overflow.patch new file mode 100644 index 00000000000..3e16e6c77e1 --- /dev/null +++ b/queue-2.6.32/softlockup-stop-spurious-softlockup-messages-due-to-overflow.patch @@ -0,0 +1,41 @@ +From 8c2eb4805d422bdbf60ba00ff233c794d23c3c00 Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Fri, 19 Mar 2010 10:28:02 +0000 +Subject: softlockup: Stop spurious softlockup messages due to overflow + +From: Colin Ian King + +commit 8c2eb4805d422bdbf60ba00ff233c794d23c3c00 upstream. + +Ensure additions on touch_ts do not overflow. This can occur +when the top 32 bits of the TSC reach 0xffffffff causing +additions to touch_ts to overflow and this in turn generates +spurious softlockup warnings. + +Signed-off-by: Colin Ian King +Cc: Peter Zijlstra +Cc: Eric Dumazet +LKML-Reference: <1268994482.1798.6.camel@lenovo> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/softlockup.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/kernel/softlockup.c ++++ b/kernel/softlockup.c +@@ -140,11 +140,11 @@ void softlockup_tick(void) + * Wake up the high-prio watchdog task twice per + * threshold timespan. + */ +- if (now > touch_timestamp + softlockup_thresh/2) ++ if (time_after(now - softlockup_thresh/2, touch_timestamp)) + wake_up_process(per_cpu(watchdog_task, this_cpu)); + + /* Warn about unreasonable delays: */ +- if (now <= (touch_timestamp + softlockup_thresh)) ++ if (time_before_eq(now - softlockup_thresh, touch_timestamp)) + return; + + per_cpu(print_timestamp, this_cpu) = touch_timestamp;