qcacld-3.0: Add null vdev check in logging config
Currently, host driver takes vdev reference while sending coex
logging config to the target. If user issues logging config
command before creating vdev, then vdev will be null and
dereferencing it causes crash in driver.
To fix this, add null check for vdev just after taking reference.
Change-Id: I91d7834ecdc506a7b7a20b38a7c8150bd22adb72
CRs-Fixed: 3637112
This commit is contained in:

committed by
Rahul Choudhary

parent
0f95a0d1a3
commit
581c1128bd
@@ -128,13 +128,18 @@ ucfg_coex_send_logging_config(struct wlan_objmgr_psoc *psoc,
|
||||
QDF_STATUS status;
|
||||
|
||||
if (apps_args[0] != COEX_CONFIG_ENABLE_CONT_INFO) {
|
||||
coex_err("invalid cmd %d", apps_args);
|
||||
coex_err("invalid cmd %d", apps_args[0]);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
vdev = wlan_objmgr_get_vdev_by_opmode_from_psoc(psoc, QDF_STA_MODE,
|
||||
WLAN_COEX_ID);
|
||||
|
||||
if (!vdev) {
|
||||
coex_err("vdev is null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
param.vdev_id = wlan_vdev_get_id(vdev);
|
||||
param.config_type = WMI_COEX_CONFIG_ENABLE_CONT_INFO;
|
||||
param.config_arg1 = apps_args[1];
|
||||
|
Reference in New Issue
Block a user