diff options
| author | Yun Park <yunp@codeaurora.org> | 2017-01-13 10:12:31 -0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-01-16 17:50:06 -0800 |
| commit | 54cc1cf720ed0aa769804a07a7a6b1ccd3b05cd8 (patch) | |
| tree | 4176dadb7bd570d7bc8f877f3fe54792bbc48759 | |
| parent | 7d60efa0c78186c4b8632afeb1f0c2bec3fcb3fc (diff) | |
qcacld-3.0: Fix potential NULL dereference in ol_txrx_lro_flush
Pointer 'pdev' returned from call to function cds_get_context may be
NULL and will be dereferenced.
Fix to check if pdev is not NULL before dereferencing it.
Change-Id: I401f2cab852dc85863b7fb1732fbb8950d341756
CRs-Fixed: 1111504
| -rw-r--r-- | core/dp/txrx/ol_txrx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index bb8b03c4067e..9818dc605a26 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -4816,6 +4816,12 @@ static void ol_txrx_lro_flush(void *data) if (qdf_unlikely(!sched_ctx)) return; + if (qdf_unlikely(!pdev)) { + QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR, + "Pdev is NULL"); + return; + } + if (!ol_cfg_is_rx_thread_enabled(pdev->ctrl_pdev)) { ol_txrx_lro_flush_handler(data, NULL, 0); } else { |
