qcacld-3.0: Return false when vdev and pool is NULL in fwd_thresh_check
vdev and pool could be NULL during processing the forwarding packets processed during the driver deinit. Add a code to return false if pool is NULL in ol_txrx_fwd_desc_thresh_ check(), then the caller will discard the packet without any further processing. Also return false when vdev is NULL. Change-Id: I45afcbe0e8b953bd1be7b3f1f5315f35879edec5 CRs-Fixed: 1112619
这个提交包含在:
@@ -5046,14 +5046,17 @@ ol_txrx_fwd_desc_thresh_check(struct ol_txrx_vdev_t *vdev)
|
|||||||
bool enough_desc_flag;
|
bool enough_desc_flag;
|
||||||
|
|
||||||
if (!vdev)
|
if (!vdev)
|
||||||
return true;
|
return false;
|
||||||
|
|
||||||
pool = vdev->pool;
|
pool = vdev->pool;
|
||||||
|
|
||||||
|
if (!pool)
|
||||||
|
return false;
|
||||||
|
|
||||||
qdf_spin_lock_bh(&pool->flow_pool_lock);
|
qdf_spin_lock_bh(&pool->flow_pool_lock);
|
||||||
enough_desc_flag = (pool->avail_desc < (pool->stop_th +
|
enough_desc_flag = (pool->avail_desc < (pool->stop_th +
|
||||||
OL_TX_NON_FWD_RESERVE))
|
OL_TX_NON_FWD_RESERVE))
|
||||||
? false : true;
|
? false : true;
|
||||||
qdf_spin_unlock_bh(&pool->flow_pool_lock);
|
qdf_spin_unlock_bh(&pool->flow_pool_lock);
|
||||||
return enough_desc_flag;
|
return enough_desc_flag;
|
||||||
}
|
}
|
||||||
|
在新工单中引用
屏蔽一个用户