diff options
author | Shaul Triebitz <shaul.triebitz@intel.com> | 2018-03-22 14:14:45 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2018-05-30 09:44:20 +0300 |
commit | 0f22e40053bd5378ad1e3250e65c574fd61c0cd6 (patch) | |
tree | 8157bc61b98326b39a82eb718a5463998b7d4467 /drivers/net/wireless/intel | |
parent | 0eac9abace1629c20420d9122d6edc80d292b0ec (diff) | |
download | linux-0f22e40053bd5378ad1e3250e65c574fd61c0cd6.tar.gz linux-0f22e40053bd5378ad1e3250e65c574fd61c0cd6.tar.bz2 linux-0f22e40053bd5378ad1e3250e65c574fd61c0cd6.zip |
iwlwifi: pcie: fix race in Rx buffer allocator
Make sure the rx_allocator worker is canceled before running the
rx_init routine. rx_init frees and re-allocates all rxb's pages. The
rx_allocator worker also allocates pages for the used rxb's. Running
rx_init and rx_allocator simultaniously causes a kernel panic. Fix
that by canceling the work in rx_init.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c index f772d70a65e4..d15f5ba2dc77 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c @@ -902,6 +902,8 @@ static int _iwl_pcie_rx_init(struct iwl_trans *trans) } def_rxq = trans_pcie->rxq; + cancel_work_sync(&rba->rx_alloc); + spin_lock(&rba->lock); atomic_set(&rba->req_pending, 0); atomic_set(&rba->req_ready, 0); |