diff options
| author | Yun Park <yunp@codeaurora.org> | 2017-01-18 14:44:20 -0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-01-23 16:18:10 -0800 |
| commit | 857d5256285f6e658cd23145f522148689f57d38 (patch) | |
| tree | 0c312e1b0a944943ff25fa4b1c5dd4046eafc22d | |
| parent | 3359b0af6bfca0dfcd34fbcbf49632a6f8e3612d (diff) | |
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
| -rw-r--r-- | core/dp/txrx/ol_txrx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index ebcc07cb3390..206033a0f622 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -5002,10 +5002,13 @@ ol_txrx_fwd_desc_thresh_check(struct ol_txrx_vdev_t *vdev) bool enough_desc_flag; if (!vdev) - return true; + return false; pool = vdev->pool; + if (!pool) + return false; + qdf_spin_lock_bh(&pool->flow_pool_lock); enough_desc_flag = (pool->avail_desc < (pool->stop_th + OL_TX_NON_FWD_RESERVE)) |
