diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-03-10 15:22:03 +0200 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-05-15 09:56:02 +0200 |
commit | 02f079bf44c85322a0383d6e0e10fe5752f61595 (patch) | |
tree | 4fde3f5993afc96c1830f805e2a2464adb887ab5 /drivers/net/wireless/iwlwifi | |
parent | 1b18c1cf7f64cfa8a7c5cdfc3f364b4280b15660 (diff) |
iwlwifi: dvm: take mutex when sending SYNC BT config command
commit 82e5a649453a3cf23516277abb84273768a1592b upstream.
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
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c index 7aad766865c..ca9c4f1f9b0 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) |