Skip to content

Commit ce038ed

Browse files
AviSternjmberg-intel
authored andcommitted
wifi: iwlwifi: pcie: avoid a NULL pointer dereference
It possible that while the rx rb is being handled, the transport has been stopped and re-started. In this case the tx queue pointer is not yet initialized, which will lead to a NULL pointer dereference. Fix it. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20231207044813.cd0898cafd89.I0b84daae753ba9612092bf383f5c6f761446e964@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 8c386b1 commit ce038ed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/wireless/intel/iwlwifi/pcie

drivers/net/wireless/intel/iwlwifi/pcie/rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ static void iwl_pcie_rx_handle_rb(struct iwl_trans *trans,
13851385
* if it is true then one of the handlers took the page.
13861386
*/
13871387

1388-
if (reclaim) {
1388+
if (reclaim && txq) {
13891389
u16 sequence = le16_to_cpu(pkt->hdr.sequence);
13901390
int index = SEQ_TO_INDEX(sequence);
13911391
int cmd_index = iwl_txq_get_cmd_index(txq, index);

0 commit comments

Comments
 (0)