Patch "iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iwlwifi-pcie-make-sure-prph_info-is-set-when-treatin.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0fbfb20b810eacd91e06f68ed728f4ba827a8393
Author: Luca Coelho <luciano.coelho@xxxxxxxxx>
Date:   Sun Dec 19 13:28:34 2021 +0200

    iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ
    
    [ Upstream commit 459fc0f2c6b0f6e280bfa0f230c100c9dfe3a199 ]
    
    In some rare cases when the HW is in a bad state, we may get this
    interrupt when prph_info is not set yet.  Then we will try to
    dereference it to check the sleep_notif element, which will cause an
    oops.
    
    Fix that by ignoring the interrupt if prph_info is not set yet.
    
    Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>
    Link: https://lore.kernel.org/r/iwlwifi.20211219132536.0537aa562313.I183bb336345b9b3da196ba9e596a6f189fbcbd09@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
index 2c13fa8f28200..6aedf5762571d 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
@@ -2260,7 +2260,12 @@ irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id)
 		}
 	}
 
-	if (inta_hw & MSIX_HW_INT_CAUSES_REG_WAKEUP) {
+	/*
+	 * In some rare cases when the HW is in a bad state, we may
+	 * get this interrupt too early, when prph_info is still NULL.
+	 * So make sure that it's not NULL to prevent crashing.
+	 */
+	if (inta_hw & MSIX_HW_INT_CAUSES_REG_WAKEUP && trans_pcie->prph_info) {
 		u32 sleep_notif =
 			le32_to_cpu(trans_pcie->prph_info->sleep_notif);
 		if (sleep_notif == IWL_D3_SLEEP_STATUS_SUSPEND ||



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux