mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
wifi: iwlwifi: pcie: avoid a NULL pointer dereference
[ Upstream commit ce038edfce
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
fd13543dbb
commit
d66ffc87ba
1 changed files with 1 additions and 1 deletions
|
@ -1380,7 +1380,7 @@ static void iwl_pcie_rx_handle_rb(struct iwl_trans *trans,
|
|||
* if it is true then one of the handlers took the page.
|
||||
*/
|
||||
|
||||
if (reclaim) {
|
||||
if (reclaim && txq) {
|
||||
u16 sequence = le16_to_cpu(pkt->hdr.sequence);
|
||||
int index = SEQ_TO_INDEX(sequence);
|
||||
int cmd_index = iwl_txq_get_cmd_index(txq, index);
|
||||
|
|
Loading…
Reference in a new issue