mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacld-3.0: Fix lro dereg crash on driver unload
If lro_disable is called after cds_close, which is the case for module unloads, then many of the pointers used in dereg sequence are NULL (CE_state, hif, txrx_pdev). There is a case, when interfaces are removed, when these pointers are there. Check pointers before using them in dereg code. Update hif_map_service_to_pipe so that it will return E_INVAL if the service is not in the table. Add logs for cases where either leg information is not updated on return. Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com> Change-Id: I5b88a297134dcc1d7a6a68dd2a9879dfd1553a7e CRs-Fixed: 1014428
This commit is contained in:
parent
0c45f699e9
commit
ef45abaa6e
1 changed files with 10 additions and 4 deletions
|
|
@ -3919,8 +3919,11 @@ void ol_register_lro_flush_cb(void (handler)(void *), void *data)
|
|||
(struct hif_opaque_softc *)cds_get_context(QDF_MODULE_ID_HIF);
|
||||
struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
pdev->lro_info.lro_flush_cb = handler;
|
||||
pdev->lro_info.lro_data = data;
|
||||
if (pdev != NULL) {
|
||||
pdev->lro_info.lro_flush_cb = handler;
|
||||
pdev->lro_info.lro_data = data;
|
||||
} else
|
||||
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, "%s: pdev NULL!", __func__);
|
||||
|
||||
hif_lro_flush_cb_register(hif_device, ol_txrx_lro_flush, pdev);
|
||||
}
|
||||
|
|
@ -3942,8 +3945,11 @@ void ol_deregister_lro_flush_cb(void)
|
|||
|
||||
hif_lro_flush_cb_deregister(hif_device);
|
||||
|
||||
pdev->lro_info.lro_flush_cb = NULL;
|
||||
pdev->lro_info.lro_data = NULL;
|
||||
if (pdev != NULL) {
|
||||
pdev->lro_info.lro_flush_cb = NULL;
|
||||
pdev->lro_info.lro_data = NULL;
|
||||
} else
|
||||
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR, "%s: pdev NULL!", __func__);
|
||||
}
|
||||
#endif /* FEATURE_LRO */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue