diff options
| author | Himanshu Agarwal <himanaga@qti.qualcomm.com> | 2015-08-12 17:01:54 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-08-24 07:05:45 -0700 |
| commit | 8e41597e1eabca1bbe291ffa44dc636f8cdebb41 (patch) | |
| tree | 64c80a43c57f2a086f36180f93feffba2d45fd98 | |
| parent | 341e12ee262687b688ea9e720ae60cf4b8724b55 (diff) | |
qcacld-2.0: Adding sanity check to prevent access of null txrx pdev
While driver initialization, firmware crashes but system ignores it because
of being in middle of driver initialization which leads to driver
initialization timeout causing txrx pdev structure to remain uninitialized.
While cleaning up of driver, WLANTL_Close passes NULL txrx pdev to
ol_txrx_pdev_detach as an argument which in turn passes it to other
functions which tries to access the contents of NULL txrx pdev causing
system crash.
This fix adds a sanity check right at the starting of the
ol_txrx_pdev_detach function which returns the function back to
WLANTL_Close if txrx pdev is NULL.
CRs-Fixed: 888679
Change-Id: I320a299e223ecb294a4ea03d40996091480f1a39
| -rw-r--r-- | CORE/CLD_TXRX/TXRX/ol_txrx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CORE/CLD_TXRX/TXRX/ol_txrx.c b/CORE/CLD_TXRX/TXRX/ol_txrx.c index bf3ce57670c5..edbe624a2839 100644 --- a/CORE/CLD_TXRX/TXRX/ol_txrx.c +++ b/CORE/CLD_TXRX/TXRX/ol_txrx.c @@ -822,6 +822,11 @@ void ol_txrx_pdev_detach(ol_txrx_pdev_handle pdev, int force) { int i; + /*checking to ensure txrx pdev structure is not NULL */ + if (!pdev) { + TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, "NULL pdev passed to %s\n", __func__); + return; + } /* preconditions */ TXRX_ASSERT2(pdev); |
