]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: pcie: NULLify pointers after free
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 10 Feb 2021 11:56:35 +0000 (13:56 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 10 Feb 2021 12:37:30 +0000 (14:37 +0200)
commitb992a2f60b44d645be4598a8c3f6f9106b5b950d
tree383c4ac34aea903a6e1a95f23e1717c4dee11bb6
parentd9a90f662a6a4c3e70e062189e3729e795dc8daf
iwlwifi: pcie: NULLify pointers after free

Remember that those pointers have been freed by setting them
to NULL. Otherwise, we'd keep rxq pointing to random memory
which would prevent us from trying to re-allocate the Rx
resources if we call rx_alloc again.

Also, propagate the allocation failure to the caller of
iwl_pcie_nic_init so that we won't go further in the
start flow.

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.20210210135352.996b400d2f1c.I630379c504644700322f57b259383ae0af8d1975@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/rx.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c