Skip to content

Commit

Permalink
net: wwan: iosm: fix crash in peek throughput test
Browse files Browse the repository at this point in the history
Peek throughput UL test is resulting in crash. If the UL
transfer block free list is exhaust, the peeked skb is freed.
In the next transfer freed skb is referred from UL list which
results in crash.

Don't free the skb if UL transfer blocks are unavailable. The
pending skb will be picked for transfer on UL transfer block
available.

Fixes: 1f52d7b ("net: wwan: iosm: Enable M.2 7360 WWAN card support")
Signed-off-by: M Chetan Kumar <m.chetan.kumar@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
M Chetan Kumar authored and David S. Miller committed Nov 28, 2022
1 parent 4a99e3c commit 2290a1d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/wwan/iosm/iosm_ipc_mux_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1207,10 +1207,9 @@ static int mux_ul_dg_update_tbl_index(struct iosm_mux *ipc_mux,
qlth_n_ql_size, ul_list);
ipc_mux_ul_adb_finish(ipc_mux);
if (ipc_mux_ul_adb_allocate(ipc_mux, adb, &ipc_mux->size_needed,
IOSM_AGGR_MUX_SIG_ADBH)) {
dev_kfree_skb(src_skb);
IOSM_AGGR_MUX_SIG_ADBH))
return -ENOMEM;
}

ipc_mux->size_needed = le32_to_cpu(adb->adbh->block_length);

ipc_mux->size_needed += offsetof(struct mux_adth, dg);
Expand Down

0 comments on commit 2290a1d

Please sign in to comment.