]> git.baikalelectronics.ru Git - kernel.git/commitdiff
iwlwifi: pcie: don't crash when rx queues aren't allocated in interrupt
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 10 Feb 2021 12:29:26 +0000 (14:29 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 10 Feb 2021 12:39:43 +0000 (14:39 +0200)
WARNING is better than crashing. Since this happened to me,
be on the safe side.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210210142629.d4651427fcda.I1bcecb73676d039e2521309c07fc6b6314a90546@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/rx.c

index 534fe62b8a30e2a75a744012ecb98b9ba492ccaf..42426e25cac605aabe41ab134a4233e0e1028fbb 100644 (file)
@@ -1658,6 +1658,9 @@ irqreturn_t iwl_pcie_irq_rx_msix_handler(int irq, void *dev_id)
        if (WARN_ON(entry->entry >= trans->num_rx_queues))
                return IRQ_NONE;
 
+       if (WARN_ONCE(!rxq, "Got MSI-X interrupt before we have Rx queues"))
+               return IRQ_NONE;
+
        lock_map_acquire(&trans->sync_cmd_lockdep_map);
 
        local_bh_disable();