summaryrefslogtreecommitdiffstats
path: root/iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@fedoraproject.org>2014-03-12 09:26:17 -0400
committerJosh Boyer <jwboyer@fedoraproject.org>2014-03-12 09:26:20 -0400
commit196742ef065a645c51af71086e9cbc71a407c94b (patch)
tree6ce1d482496b1b45c36454c24e0cdc88c38665a7 /iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch
parent5210c91e6990f0e90864aff3c51c9928775de100 (diff)
downloadkernel-196742ef065a645c51af71086e9cbc71a407c94b.tar.gz
kernel-196742ef065a645c51af71086e9cbc71a407c94b.tar.xz
kernel-196742ef065a645c51af71086e9cbc71a407c94b.zip
Fix locking issue in iwldvm (rhbz 1046495)
Diffstat (limited to 'iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch')
-rw-r--r--iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch b/iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch
new file mode 100644
index 000000000..ee06d9f09
--- /dev/null
+++ b/iwlwifi-dvm-take-mutex-when-sending-SYNC-BT-config-command.patch
@@ -0,0 +1,48 @@
+Bugzilla: 1046495
+Upstream-status: Sent for 3.14 http://marc.info/?l=linux-wireless&m=139453882510796&w=2
+
+From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+
+There is a flow in which we send the host command in SYNC
+mode, but we don't take priv->mutex.
+
+Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1046495
+
+Cc: <stable@vger.kernel.org>
+Reviewed-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
+---
+ drivers/net/wireless/iwlwifi/dvm/main.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c
+index ba1b1ea..ea7e70c 100644
+--- a/drivers/net/wireless/iwlwifi/dvm/main.c
++++ b/drivers/net/wireless/iwlwifi/dvm/main.c
+@@ -252,13 +252,17 @@ static void iwl_bg_bt_runtime_config(struct work_struct *work)
+ struct iwl_priv *priv =
+ container_of(work, struct iwl_priv, bt_runtime_config);
+
++ mutex_lock(&priv->mutex);
+ if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+- return;
++ goto out;
+
+ /* dont send host command if rf-kill is on */
+ if (!iwl_is_ready_rf(priv))
+- return;
++ goto out;
++
+ iwlagn_send_advance_bt_config(priv);
++out:
++ mutex_unlock(&priv->mutex);
+ }
+
+ static void iwl_bg_bt_full_concurrency(struct work_struct *work)
+--
+1.8.3.2
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html