From 724ecb775e20895f8abf9c3d7ffd5875a8387de7 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 3 Oct 2014 10:54:35 -0700 Subject: [PATCH] 3.10-stable patches added patches: revert-iwlwifi-dvm-don-t-enable-cts-to-self.patch workqueue-apply-__wq_ordered-to-create_singlethread_workqueue.patch --- ...iwlwifi-dvm-don-t-enable-cts-to-self.patch | 48 +++++++++++++ queue-3.10/series | 2 + ...red-to-create_singlethread_workqueue.patch | 67 +++++++++++++++++++ 3 files changed, 117 insertions(+) create mode 100644 queue-3.10/revert-iwlwifi-dvm-don-t-enable-cts-to-self.patch create mode 100644 queue-3.10/workqueue-apply-__wq_ordered-to-create_singlethread_workqueue.patch diff --git a/queue-3.10/revert-iwlwifi-dvm-don-t-enable-cts-to-self.patch b/queue-3.10/revert-iwlwifi-dvm-don-t-enable-cts-to-self.patch new file mode 100644 index 00000000000..a3e5696f563 --- /dev/null +++ b/queue-3.10/revert-iwlwifi-dvm-don-t-enable-cts-to-self.patch @@ -0,0 +1,48 @@ +From f47f46d7b09cf1d09e4b44b6cc4dd7d68a08028c Mon Sep 17 00:00:00 2001 +From: Emmanuel Grumbach +Date: Sun, 31 Aug 2014 22:11:11 +0300 +Subject: Revert "iwlwifi: dvm: don't enable CTS to self" + +From: Emmanuel Grumbach + +commit f47f46d7b09cf1d09e4b44b6cc4dd7d68a08028c upstream. + +This reverts commit 43d826ca5979927131685cc2092c7ce862cb91cd. + +This commit caused packet loss. + +Signed-off-by: Emmanuel Grumbach +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlwifi/dvm/rxon.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/drivers/net/wireless/iwlwifi/dvm/rxon.c ++++ b/drivers/net/wireless/iwlwifi/dvm/rxon.c +@@ -1072,6 +1072,13 @@ int iwlagn_commit_rxon(struct iwl_priv * + /* recalculate basic rates */ + iwl_calc_basic_rates(priv, ctx); + ++ /* ++ * force CTS-to-self frames protection if RTS-CTS is not preferred ++ * one aggregation protection method ++ */ ++ if (!priv->hw_params.use_rts_for_aggregation) ++ ctx->staging.flags |= RXON_FLG_SELF_CTS_EN; ++ + if ((ctx->vif && ctx->vif->bss_conf.use_short_slot) || + !(ctx->staging.flags & RXON_FLG_BAND_24G_MSK)) + ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK; +@@ -1477,6 +1484,11 @@ void iwlagn_bss_info_changed(struct ieee + else + ctx->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK; + ++ if (bss_conf->use_cts_prot) ++ ctx->staging.flags |= RXON_FLG_SELF_CTS_EN; ++ else ++ ctx->staging.flags &= ~RXON_FLG_SELF_CTS_EN; ++ + memcpy(ctx->staging.bssid_addr, bss_conf->bssid, ETH_ALEN); + + if (vif->type == NL80211_IFTYPE_AP || diff --git a/queue-3.10/series b/queue-3.10/series index 962c527444d..8aec9103acb 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -89,3 +89,5 @@ iscsi-target-avoid-null-pointer-in-iscsi_copy_param_list-failure.patch iscsi-target-fix-memory-corruption-in-iscsit_logout_post_handler_diffcid.patch nfc-microread-potential-overflows-in-microread_target_discovered.patch scsi-libiscsi-fix-potential-buffer-overrun-in-__iscsi_conn_send_pdu.patch +revert-iwlwifi-dvm-don-t-enable-cts-to-self.patch +workqueue-apply-__wq_ordered-to-create_singlethread_workqueue.patch diff --git a/queue-3.10/workqueue-apply-__wq_ordered-to-create_singlethread_workqueue.patch b/queue-3.10/workqueue-apply-__wq_ordered-to-create_singlethread_workqueue.patch new file mode 100644 index 00000000000..f987f801390 --- /dev/null +++ b/queue-3.10/workqueue-apply-__wq_ordered-to-create_singlethread_workqueue.patch @@ -0,0 +1,67 @@ +From e09c2c295468476a239d13324ce9042ec4de05eb Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Sat, 13 Sep 2014 04:14:30 +0900 +Subject: workqueue: apply __WQ_ORDERED to create_singlethread_workqueue() + +From: Tejun Heo + +commit e09c2c295468476a239d13324ce9042ec4de05eb upstream. + +create_singlethread_workqueue() is a compat interface for single +threaded workqueue which maps to ordered workqueue w/ rescuer in the +current implementation. create_singlethread_workqueue() currently +implemented by invoking alloc_workqueue() w/ appropriate parameters. + +8719dceae2f9 ("workqueue: reject adjusting max_active or applying +attrs to ordered workqueues") introduced __WQ_ORDERED to protect +ordered workqueues against dynamic attribute changes which can break +ordering guarantees but forgot to apply it to +create_singlethread_workqueue(). This in itself is okay as nobody +currently uses dynamic attribute change on workqueues created with +create_singlethread_workqueue(). + +However, 4c16bd327c ("workqueue: implement NUMA affinity for unbound +workqueues") broke singlethreaded guarantee for ordered workqueues +through allocating a separate pool_workqueue on each NUMA node by +default. A later change 8a2b75384444 ("workqueue: fix ordered +workqueues in NUMA setups") fixed it by allocating only one global +pool_workqueue if __WQ_ORDERED is set. + +Combined, the __WQ_ORDERED omission in create_singlethread_workqueue() +became critical breaking its single threadedness and ordering +guarantee. + +Let's make create_singlethread_workqueue() wrap +alloc_ordered_workqueue() instead so that it inherits __WQ_ORDERED and +can implicitly track future ordered_workqueue changes. + +v2: I missed that __WQ_ORDERED now protects against pwq splitting + across NUMA nodes and incorrectly described the patch as a + nice-to-have fix to protect against future dynamic attribute + usages. Oleg pointed out that this is actually a critical + breakage due to 8a2b75384444 ("workqueue: fix ordered workqueues + in NUMA setups"). + +Signed-off-by: Tejun Heo +Reported-by: Mike Anderson +Cc: Oleg Nesterov +Cc: Gustavo Luiz Duarte +Cc: Tomas Henzl +Fixes: 4c16bd327c ("workqueue: implement NUMA affinity for unbound workqueues") +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/workqueue.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/linux/workqueue.h ++++ b/include/linux/workqueue.h +@@ -414,7 +414,7 @@ __alloc_workqueue_key(const char *fmt, u + #define create_freezable_workqueue(name) \ + alloc_workqueue((name), WQ_FREEZABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1) + #define create_singlethread_workqueue(name) \ +- alloc_workqueue((name), WQ_UNBOUND | WQ_MEM_RECLAIM, 1) ++ alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, name) + + extern void destroy_workqueue(struct workqueue_struct *wq); + -- 2.47.3