]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: mvm: protect RCU dereference in iwl_mvm_get_key_sta_id
authorJohannes Berg <johannes.berg@intel.com>
Fri, 11 Dec 2015 08:06:25 +0000 (09:06 +0100)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 13 Dec 2015 11:38:26 +0000 (13:38 +0200)
commitf5d445eeaee45d84bfff3a659e44b5254de5a3b1
treecf984f2e986f46770bacdf22dea4fe711f0298fd
parent770037528eb8adb39d27720a28273c8aa4f7802b
iwlwifi: mvm: protect RCU dereference in iwl_mvm_get_key_sta_id

Properly protect the RCU dereference in iwl_mvm_get_key_sta_id() when
coming from iwl_mvm_update_tkip_key() which cannot hold the mvm->mutex
by moving the call into the RCU critical section.
Modify the check to use rcu_dereference_check() to permit this.

Fixes: 0f6eebfd7eb9 ("iwlwifi: mvm: Avoid dereferencing sta if it was already flushed")
Reported-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/sta.c