mirror of
https://github.com/nxp-imx/mwifiex.git
synced 2024-11-14 11:05:34 +00:00
Issue: WCSWREL-352 Fix for driver kernel panic with use after free print
[Description] Accessing "pmbuf" after mlan_send_packet results in kernel panic with "use after free" print. [Fix] Moved the link layer statistics related code which accesses "pmbuf" to the front of mlan_send_packet function. Signed-off-by: Meet Patel <meet.patel@nxp.com>
This commit is contained in:
parent
3a50175cae
commit
64421ad41f
1 changed files with 10 additions and 9 deletions
|
@ -7055,18 +7055,19 @@ static int woal_start_xmit(moal_private *priv, struct sk_buff *skb)
|
|||
index = skb_get_queue_mapping(skb);
|
||||
#endif
|
||||
|
||||
if (is_zero_timeval(priv->phandle->tx_time_start)) {
|
||||
priv->phandle->tx_time_start.time_sec =
|
||||
pmbuf->in_ts_sec;
|
||||
priv->phandle->tx_time_start.time_usec =
|
||||
pmbuf->in_ts_usec;
|
||||
PRINTM(MINFO, "%s : start_timeval=%d:%d \n", __func__,
|
||||
priv->phandle->tx_time_start.time_sec,
|
||||
priv->phandle->tx_time_start.time_usec);
|
||||
}
|
||||
|
||||
status = mlan_send_packet(priv->phandle->pmlan_adapter, pmbuf);
|
||||
switch (status) {
|
||||
case MLAN_STATUS_PENDING:
|
||||
if (is_zero_timeval(priv->phandle->tx_time_start)) {
|
||||
priv->phandle->tx_time_start.time_sec =
|
||||
pmbuf->in_ts_sec;
|
||||
priv->phandle->tx_time_start.time_usec =
|
||||
pmbuf->in_ts_usec;
|
||||
PRINTM(MINFO, "%s : start_timeval=%d:%d \n", __func__,
|
||||
priv->phandle->tx_time_start.time_sec,
|
||||
priv->phandle->tx_time_start.time_usec);
|
||||
}
|
||||
atomic_inc(&priv->phandle->tx_pending);
|
||||
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 29)
|
||||
|
|
Loading…
Reference in a new issue