qcacmn: Fix use after free of SKB in DP trace path

qdf_dp_trace could access nbuf already freed after sending to CE ring.
Move trace log before sending skb and add error log when fail to send.

Change-Id: I8ce36b9d196b7d44e0e9f7dcfe05db404a77e32f
CRs-Fixed: 2090277
This commit is contained in:
Yun Park
2017-08-15 12:04:11 -07:00
committed by nshrivas
parent 2c3dba28d9
commit c60a22b88d
3 changed files with 24 additions and 1 deletions

View File

@@ -190,6 +190,7 @@ typedef struct s_qdf_trace_data {
* @QDF_DP_TRACE_LI_DP_TX_PACKET_PTR_RECORD - Lithium DP layer ptr record
* @QDF_DP_TRACE_CE_PACKET_PTR_RECORD - CE layer ptr record
* @QDF_DP_TRACE_CE_FAST_PACKET_PTR_RECORD- CE fastpath ptr record
* @QDF_DP_TRACE_CE_FAST_PACKET_ERR_RECORD- CE fastpath error record
* @QDF_DP_TRACE_RX_HTT_PACKET_PTR_RECORD - HTT RX record
* @QDF_DP_TRACE_RX_OFFLOAD_HTT_PACKET_PTR_RECORD- HTT RX offload record
* @QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD - HDD RX record
@@ -230,6 +231,7 @@ enum QDF_DP_TRACE_ID {
QDF_DP_TRACE_RX_HDD_PACKET_PTR_RECORD,
QDF_DP_TRACE_CE_PACKET_PTR_RECORD,
QDF_DP_TRACE_CE_FAST_PACKET_PTR_RECORD,
QDF_DP_TRACE_CE_FAST_PACKET_ERR_RECORD,
QDF_DP_TRACE_RX_HTT_PACKET_PTR_RECORD,
QDF_DP_TRACE_RX_OFFLOAD_HTT_PACKET_PTR_RECORD,
QDF_DP_TRACE_RX_LI_DP_PACKET_PTR_RECORD,